1

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?

4
  • Pressure plates and x y z dx dy dz May 19, 2019 at 21:48
  • Oh wait, you also listed signs in the title. Yes, it actually works with those. May 19, 2019 at 21:48
  • @FabianRöling The issue is that im using signs and buttons, not prssure plates, and I dont like settin up scoreboards May 19, 2019 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? May 20, 2019 at 6:20

2 Answers 2

2

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.

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .