#how do i prevent players from picking up specific items through datapacks

1 messages · Page 1 of 1 (latest)

jovial portal
#

im trying to restrict players from picking up ender pearls and totems through datapacks

languid vigilBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1741969147:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1350125360506736751

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1350130541265162300

novel island
#

You target them with an execute command, check if the contained item is the one that you want to stay on the ground, then set the PickupDelay very high.

novel island
#

yes

jovial portal
#

how do i make an execute command to prevent players from picking up the specific item

forest urchin
#

Of course, they could still use hoppers and things to obtain them or find them in chests

#

If you are ok with the items being deleted, you could use an advancement to detect when a player picks one up and then clear all of those items from their inventory before revoking the advancement

#

You could also remove them from all loot tables

#

This would simply prevent players from obtaining them in the first place ^^

jovial portal
forest urchin
jovial portal
#

sure!

forest urchin
# jovial portal sure!

So, you need to create an inventory_changed advancement similar to "Cover me with Diamonds", but instead checking for ender pearls

#

Then have it reward the player with a function that clears all ender pearls and revokes the advancement

#

And then do the same thing for totems