From edb9dfe955f76873e0d149abd19ead1faf8d66fc Mon Sep 17 00:00:00 2001 From: Ceikry Date: Sat, 6 Aug 2022 12:51:08 +0000 Subject: [PATCH] Setting i_want_to_cheat to true now allows cheaters to use all commands --- Server/src/main/kotlin/rs09/game/system/command/Command.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/system/command/Command.kt b/Server/src/main/kotlin/rs09/game/system/command/Command.kt index a029badba..22bdad575 100644 --- a/Server/src/main/kotlin/rs09/game/system/command/Command.kt +++ b/Server/src/main/kotlin/rs09/game/system/command/Command.kt @@ -1,6 +1,7 @@ package rs09.game.system.command import core.game.node.entity.player.Player +import rs09.ServerConstants import rs09.game.world.GameWorld import kotlin.collections.ArrayList @@ -11,7 +12,7 @@ import kotlin.collections.ArrayList class Command(val name: String, val privilege: Privilege, val usage: String = "UNDOCUMENTED", val description: String = "UNDOCUMENTED", val handle: (Player, Array) -> Unit) { fun attemptHandling(player: Player, args: Array?){ args ?: return - if(player.rights.ordinal >= privilege.ordinal || GameWorld.settings?.isDevMode == true){ + if(player.rights.ordinal >= privilege.ordinal || GameWorld.settings?.isDevMode == true || ServerConstants.I_AM_A_CHEATER){ handle(player,args) } }