Solved Making one command accessible to only one player

Discussion in 'Spigot Plugin Development' started by Wilsoon, Mar 14, 2020.

Thread Status:
Not open for further replies.
  1. What's the best way to make a command accessible to only one specific person, even if they choose to change names? I know there's UUID but how do I match that player's UUID to the person who executed the command?
     
  2. Hello,

    Use a "specific-player" key in config.

    When player use the command, check if there is a "specific-player" value in config.
    -> If there is a value, just compare the UUID (from config & from player executing the command)
    -> If there is not, just put the player's uuid into the "specific-player" key (this would be your first & specific person)
     
    1. Use a permissions plugin.
    2. give the specific person the permission of that command
    3. don't worry about name changes, uuid is consistent
     
  3. I'll try these out, thanks.
     
Thread Status:
Not open for further replies.