#how do i prevent players from picking up specific items through datapacks
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 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
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
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
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.
through functions?
yes
how do i make an execute command to prevent players from picking up the specific item
.
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 ^^
you’re right
i tried doing that but it doesn’t work either
Do you need help with that? ^^
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