1

Minecraft button command

kjalv 1/13/20 10:39 am
142
1/13/2020 12:38 pm
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.
Posted by
kjalv
Level 1 : New Miner
0

  Have something to say?

JoinSign in

1

Bertiecrafter
01/13/2020 12:38 pm
Level 72 : Legendary System
history
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.
3

Welcome