I am trying to create a treasure shop from my vanilla server and I need some help with a command.
I want it that when you press a button it will test for if there a no players in a certain area around the block. What is the command?
I want it that when you press a button it will test for if there a no players in a certain area around the block. What is the command?
5
Nevermind, works now.
Use a one sided AND gate with the /test for command
One problem: the torch is on even without pressing the button. So when I press it and the torch is already on, nothing happens.
Flip it first. edit: not really sure he knows how to get output, this was to response to the other one.
Button > Command Block > Comparator > ur output
Button > Command Block > Comparator > ur output
You can use a
/testfor @a[r=10], then invert that signal. Basically, make a command block that DOES detect for players around it, and feed that redstone signal into a redstone torch so it turns off when a player is detected.
