As of 1.10 You can keep your items with /gamerule keepinventory true. A lot of people say remove EXP, and keep items. However, my goal is to keep EXP, but lose items. Is this at all possible? If it takes a plugin, tell me which one. I can't use mods, as this world is a server. Thanks for noticing!
1 Answer
Yes. instead of killing a player, you can just clear the items from his inverntory:
/clear [player] [item] [data] [maxCount] [dataTag]The attributes in brackets are optional. In order to clear every player's inventory, use this:
/clear @aAnd to delete 5 dirt blocks from the nearest player's invetory, use this:
/clear @p dirt 5For more information on how to use the /clear command, visit the Minecraft Wiki
If you want also to teleport the players to spawn, just kill them with /kill @a (assuming you already have done /gamerule keepInventory true)