Minecraft How To Clear Inventory, Except An Item : Minecraft

I”m trying to start a server that clears your inventory when spawning without pressure plates. Please help.

Đang xem: Minecraft how to clear inventory



Shouldn't players spawn with empty inventories anyway? Do I misunderstand something? –user232393 Jun 28 “19 at 15:33
You can use the command /clear , where:

targets is optional. It is the name of the player (or a target selector) whose inventory you wish to clear. If no player isspecified, it will default to the player running the command.

item is optional. It is the item to clear (See list of Minecraft items). If no item is specified, then all items in the player”sinventory will be cleared.

maxCount is optional. It is the maximum number of items that will be cleared. If you omit this parameter or use -1, all matching itemswill be cleared.

Read more: Wow Chains Of The Anub'Ar, Quest:Chains Of The Anub&#39Ar

For your requirements, I suggest /clear


the best way that I can think of is to make a command where every player except certain players have a repeat command the clears their inventory like this:


replace the extra name with names of players that you want their items to not be removed for example


this will clear all player inventories except Steve,NoobSlayer700,Steve(1) and Dinnerbone


There are many ways to do this. First I need to know:

Do you want to make a PVP server or a freebuild server or something else? In which cases do you want to clear the player”s inventory? Which version and console do you use?

What you can do is set the spawnpoint into a cube on bedrock, somewhere near to y=5 or so, and then clear the inventory of every player which is in the cube, and finally, teleport these players to the real spawn.


Thanks for contributing an answer to Arqade!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

Read more: a trial of might wow

To learn more, see our tips on writing great answers.

Post Your Answer Discard

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 minecraft-java-edition minecraft-commands or ask your own question.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.25.38898

Leave a Comment