Nothing in nature is unbeautiful. Alfred, Lord Tennyson
Idea Transcript
Sign up
Anybody can ask a question
I tried the curse of binding, but that only prevented armor from being taken off once put on. I need this because I have a class system on my server and I don't want players giving each other items. minecraft
edited Dec 5 at 16:53
asked Dec 5 at 16:40
Assafi Cohen-Arazi
TheDerpyRedstone
720
6
1
18
3
Is there a chance of other items being on the ground? – Fabian Dec 5 at 17:34 Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Dec 5 at 19:27
1 Answer
You can remove an item on the ground like this: /kill @e[type=item]
Careful! This destroys all items on the ground! You have to specify properties of the item, for example you can assign a scoreboard based on the type or you can limit it to a radius around players. What exactly you need depends on your setup. Then you can place it back into the inventory: /replaceitem entity @p slot.hotbar.0 stone 0 1
Put both into a clock and you have prevented throwing out items. But it can still be copied over to other slots, so you can either replace all other slots with air or repeatedly take away and give the item from/to the player, whatever fits your needs. answered Dec 5 at 17:44
Fabian 2,467
1
4
23
_
Here's how it works:
Arqade is a question and answer site for passionate videogamers on all platforms. Join them; it only takes a minute: