Added go-to-spawn and clear-inventory

This commit is contained in:
Cooldude2606
2019-04-18 22:44:17 +01:00
parent 89d52fc73b
commit 2e017dbb70
7 changed files with 54 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
local Commands = 'expcore.commands'
local move_items = ext_require('expcore.common','move_items')
require 'config.command_parse_roles'
Commands.new_command('clear-inventory','Clears a players inventory')
:add_param('player',false,'player-role-alive')
:add_alias('clear-inv','move-inventory','move-inv')
:register(function(player,action_player)
local inv = action_player.get_main_inventory()
move_items(inv.get_contents())
inv.clear()
end)