5

We are creating a kit-based PvP map for Christmas. Players will be able to select a kit to fight with. Using /gamerule keepInventory false we can prevent players from dropping items on their death, however, players are still able to drop items in general. This is a problem because players could pick a kit, drop their items, and then pick a different kit. This way they are able to equip many kits at once, which is obviously unintended.

We do not want to clear all items that are on the floor in a loop, since players might accidentally drop their item when in a panic.

Setting the PickupDelay of all items to 0 also does not work as you are still able to share items with other players this way by standing really closely to each other.

How do we prevent players from dropping any and all items?

2
  • 1
    this is not an answer, but could help in finding it: on a server I play on they have a "soulbound" tag that prevents losing the item on death and also prevents dropping it (but can be placed in chests)
    – Federico
    Nov 29, 2021 at 11:20
  • @Federico In Vanilla Minecraft this exists as "Curse of Binding", but sadly this only works for armour.
    – Jeroen
    Nov 29, 2021 at 20:27

2 Answers 2

3

It seems to be possible to specify who dropped the item, for every entity that is dropped. Using command blocks you can set the item to only be able to be picked up by the actual owner of that item.

It is very well explained in this video, starting at 1:43 (timestamped for your convenience)

3
  • 1
    Spelling error "timestamped for your convenience". I would edit except edits require 6 characters.
    – AdamRaichu
    Nov 29, 2021 at 11:52
  • @AdamRaichu thanks, fixed Nov 29, 2021 at 21:00
  • Do note that this still doesn't work when players are falling since they'll out-fall the items. Still accepting it as an answer since it is good enough.
    – Jeroen
    Dec 6, 2021 at 3:00
0

As far as I know, you can use /kill @e[type=item] to remove all items currently on the world. Removing items specific to one player is tricky and requires good knowledge of command blocks.

1
  • 1
    This means that players can lose items. Dec 2, 2021 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .