mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Setting i_want_to_cheat to true now allows cheaters to use all commands
This commit is contained in:
parent
a2dd8a1f09
commit
edb9dfe955
1 changed files with 2 additions and 1 deletions
|
|
@ -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<String>) -> Unit) {
|
||||
fun attemptHandling(player: Player, args: Array<String>?){
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue