How can I do this so that only one player can turn on the button? It's Minecraft Realms server, so i can;t install any plugins.
1
I'm guessing the button fires a command?
Starting from 1.13 you can prefix the following to the command:
/execute if entity @a[name=MyUserName,distance=..2] run commandHere
This will prevent the command from running if there is no player with the specified name within 2 blocks.
There is no way to know who pressed the button.
Starting from 1.13 you can prefix the following to the command:
/execute if entity @a[name=MyUserName,distance=..2] run commandHere
This will prevent the command from running if there is no player with the specified name within 2 blocks.
There is no way to know who pressed the button.
