I recently thought of this great way to detect items in a player's inventory on the realm. I actually use it to hunt for illegal items but you could use it for anything.
4 commands.
/tag @r add checkIllegalItems
/execute @a[tag=checkIllegalItems] ~~~ clear @s <illegal item> then have a "conditional" command block set to "always active" performing
/tag @a[tag=checkIllegalItems] add ban Then at the end of the chain do
/tag @a remove checkIllegalItems
This is one of the few times I was able to make good use of @r. If you have any questions let me know!
I recently thought of this great way to detect items in a player's inventory on the realm. I actually use it to hunt for illegal items but you could use it for anything.
4 commands.
/tag @r add checkIllegalItems
/execute @a[tag=checkIllegalItems] ~~~ clear @s <illegal item>
then have a "conditional" command block set to "always active" performing
/tag @a[tag=checkIllegalItems] add ban
Then at the end of the chain do
/tag @a remove checkIllegalItems
This is one of the few times I was able to make good use of @r. If you have any questions let me know!