This is a very important Question to me, as it relates to my Server/Realm as I use completely command blocks for everything, and due to the point that the closest thing to detecting the activator is using @p, I guess you could see where that would go wrong with a lot of players.

So if anyone can, is there a method of using /execute or /testfor to detect this? I'm trying to teleport specific players who click a button by the way. Also I have a sign that when clicked also teleports the players, is there a method of doing this for command signs aswell?

  • Pressure plates and x y z dx dy dz – Fabian Röling May 19 '19 at 21:48
  • Oh wait, you also listed signs in the title. Yes, it actually works with those. – Fabian Röling May 19 '19 at 21:48
  • @FabianRöling The issue is that im using signs and buttons, not prssure plates, and I dont like settin up scoreboards – Mister SirCode May 19 '19 at 23:39
  • Triggers are the one way to do it, they are made for that. If you don't like setting up scoreboards, then you can't do what you want. May I ask why you don't like them? Do you not understand how they work for example? – Fabian Röling May 20 '19 at 6:20

When a player clicks on a sign with a command, it's automatically executed as that player, so you can use a trigger command to let the player set a score for themselves by clicking the sign. Then you just do things based on that score.


if on anything other than Java, do testfor [x=<#>,y=<#>,z=<#>,dx=<#>,dy=<#>,dz=<#>]

(this pic is only an example the shaded area is the range area, the d stands for distance from command block)

add picture description

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.