0

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!

2

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 @a

And to delete 5 dirt blocks from the nearest player's invetory, use this:

/clear @p dirt 5

For 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)

1
  • @Emeraldimension feel free to hit the gray check mark next to this answer if it helped you! Thanks!
    – user143228
    Nov 5 '16 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.