Is there a way to Select the Entity that Activates the Command Block / Sign?

Is there a way to Select the Entity that Activates the Command Block / Sign? - Wet road with signal posts in residential area

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?



Best Answer

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




Pictures about "Is there a way to Select the Entity that Activates the Command Block / Sign?"

Is there a way to Select the Entity that Activates the Command Block / Sign? - Set of red dice stacked together on wooden table placed on sunny terrace in daylight
Is there a way to Select the Entity that Activates the Command Block / Sign? - Red stop button on yellow handrail in modern empty public bus during daytime
Is there a way to Select the Entity that Activates the Command Block / Sign? - Drone view of modern buildings located in rows between roads in suburb of contemporary town on daytime



How do you select a specific entity in Minecraft?

The @e target selector is used to target all entities in the game. This includes both players and mobs in the world. Notice that in this last example, we have used [type=enderman] to target only enderman. This value is called a target selector argument and allows us to filter the target.



Trying VIRAL Command Block Hacks To See If They Work




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Vlad Fonsark, Matthias Groeneveld, Will Mu, Kelly L