Changed add_tag to set_flag on commands

This commit is contained in:
Cooldude2606
2019-04-09 16:16:05 +01:00
parent cbde97e7b0
commit e9a4382277
8 changed files with 19 additions and 19 deletions

View File

@@ -3,10 +3,10 @@ require 'config.command_parse_general'
Commands.new_command('toggle-cheat-mode','Toggles cheat mode for your player, or another player.')
:add_param('player',true,'player') -- player to toggle chest mode of, can be nil for self
:add_defaults{player=function(player)
:set_defaults{player=function(player)
return player -- default is the user using the command
end}
:add_tag('admin_only',true)
:set_flag('admin_only',true)
:register(function(player,action_player,raw)
action_player.cheat_mode = not action_player.cheat_mode
end)