Solved Config Command Executor?

Discussion in 'Spigot Plugin Development' started by Nosmakos, May 26, 2016.

Thread Status:
Not open for further replies.
  1. Correct me if I'm wrong. You want to give the user a permission node that will be checked upon confirmation on buying specified slot in the gui?
  2. So like, Player.hasPermission(String). You set that up in the plugin YML. link
    • Agree Agree x 1
  3. buying specified slot in the gui because it will run a command from gui and maybe the guy who will download this plugin might want to make this be with permission for players who have ranks or levels.
  4. exactly !
  5. So like
    Code (Text):
      Item: APPLE
      Price: 100
      Command-executor: console
      Command: "give %player% apple 1"
      Check-for-permissions: true
      Permission-node: ""
    Which will check if user has specified permission then run the command
  6. exacty! but now i have only the item and the command but how i can do for the command-executor to be console or player? and in command: if i do %player% it will work or i have to do that with
    Player player = e.getPlayer();
    and add to the config .replaceAll("%player%", player);
  7. Just make it a Boolean instead and if true then send command using #getConsoleSender otherwise just use #getPlayer and maybe change the key to send-through-console or something
  8. Cool!! thank you guys so much seriously!
    • Friendly Friendly x 1
  9. No problem, my pleasure.
    • Winner Winner x 1
    • Friendly Friendly x 1
    • Like Like x 1
Thread Status:
Not open for further replies.