The Meaning of Life, the Universe, and Everything.
Join Date:
8/23/2019
Posts:
71
Location:
Wukanda
Minecraft:
NateVA
Member Details
You can create a chest that has its slots constantly filled with items, but make sure the items have special tags. Then you can have a repeating command block that clears the entire player's inventory from those items with that tag.
Make sure that in the /clear command the item specified is completely matching the one in the chest or it won't work.
You cant make someone able to "edit" without creating something like in the attached image (if you want I can upload a schematic of it, though it doesn't have a "view only" option) but you can make it able to be taken out by someone with a certain tag:
/Execute as @a[distance=..20] unless entity @s[tag=<tag>] run clear @s <item>
How would one go about making a chest in which the player cannot edit the contents of it unless they have a certain tag?
sorry your link doesn't work (I added the spaces in)
You can create a chest that has its slots constantly filled with items, but make sure the items have special tags. Then you can have a repeating command block that clears the entire player's inventory from those items with that tag.
For example:
/item replace block <x> <y> <z> container.<#> <item>
/clear @a[distance=..20] <item>
^^
(distance from the chest)
Make sure that in the /clear command the item specified is completely matching the one in the chest or it won't work.
You cant make someone able to "edit" without creating something like in the attached image (if you want I can upload a schematic of it, though it doesn't have a "view only" option) but you can make it able to be taken out by someone with a certain tag:
/Execute as @a[distance=..20] unless entity @s[tag=<tag>] run clear @s <item>
Thanks, this was super helpful!