Minecraft Command Block Help

minecraft-commandsminecraft-java-edition

I'm making a find the button map where you press a button once found and proceed to the next level. There's one level with animals in it and they keep activating the text command so it constantly comes up and it's very annoying. Is it possible for players only to activate the command? (btw its a pressure plate, just in case it matters)

Best Answer

Use a weighed pressure plate (gold or iron). Those take more entities to power it. More info on weighed pressure plates here.

Another idea is the /testfor command.
Here is an example: /testfor @p[r=1]
Make sure (if you are using 1.9+) that the command block settings are set to, Always active and Repeat. If you are using 1.8.9 or earlier then power the command block with a clock circuit.
In this example the command block will test for players in a one block radius. To make the command block power something else when it does find someone, you just have to connect the circuit to the command block with a comparator. For more info on the redstone comparator go to here.
EDIT: Here is step by step instructions so no one gets confused:

  1. Build a command block that either is on repeat mode (1.9 up), or connect a clock to it (1.8.9 down), with the command /testfor @p[r=1] (for a longer radius change the 1).
  2. Place a comparator next to it so that the end with two torches is facing towards the command block.
  3. Connect the other end of the comparator to another command block either directly or with redstone between.
  4. Add the command /tellraw @p ["",{"text":"What you want to say.","color":"Color here"}] to the second command block. You can also use /title or any other command you need to use.