X

NOTICE

Are you sure you want to report this?

We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

2

Player Specific activation commands

4 Comments

Post a new comment:

Please sign in to leave a comment.

  • 0
    Comment actions Permalink

    Yes,I really really need this. I was actually going to say the same thing.

  • 0
    Dylan Jones commented
    Comment actions Permalink

    Hmm, this can be done through signs or /tellraw

  • 0
    Andre Chen commented
    Comment actions Permalink

    I don't think this should be added. A button translates player input into a redstone signal, but once the redstone signal is sent it is impossible to find out who pressed the button. You can't "trace" the redstone signal back to the button that started it, much less trace the press of a button to who pressed it. What you want is a target selector that targets the player that activated the command which is @s. When a command block activates, "the player that activated the command" is the command block itself, which is why @s doesn't apply. The redstone signal didn't activate the command; the player that pressed the button didn't activate the command; the command block itself activated the command.

    Like others have said, you can use JSON text to circumvent this because clicking JSON text means that you, the clicker, ran the command, so @s would apply there.

  • 0
    Comment actions Permalink

    Just put /give @s diamond_sword on the command block, it will activate whoever presses it