Code:
command /gmc [<player>]:
permission: admin.gmc
permisison message: &cNo permission
trigger:
if arg-1 is not set:
set player's gamemode to creative
equip player with chain leggings
equip player with chain helmet
equip player with chain boots
equip player with chain chestplate
else:
if arg-1 is set:
set arg-1's gamemode to creative
equip arg-1 with chain leggings
equip arg-1 with chain helmet
equip arg-1 with chain boots
equip arg-1 with chain chestplate
command /gms [<player>]:
permission: admin.gms
permission message: &cNo permission
trigger:
if arg-1 is not set:
set player's gamemode to survival
return player's inventory
else:
if arg-1 is set:
set arg-1's gamemode to survival
return arg-1's inventory
When someone goes into /gmc, they will be equipped with chain armor, I'm wondering how to save their inventory, then when they return into /gms, they are equipped with their previous inventory before they went into /gmc.