[SOLVED] Dynamically Set Permissions?

Discussion in 'Plugin Development' started by NeoSilky, Oct 21, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    NeoSilky

    Can you dynamically set permissions, so say a player can change a config to have an option have a certain node, without having it set in the plugin.yml? :)
     
  2. Offline

    thehutch

    Yes, yes you can

    For example:
    Code:java
    1. if (player.hasPermission("something." + player + ".hello")) {
    2. //do stuff
    3. }


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  3. Offline

    NeoSilky

    How? :D

    EDIT: sorry, just saw this :p

    so why would you need to put the permissions in the plugin.yml normally?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  4. Offline

    wwsean08

    you don't have to put it in there
     
  5. Offline

    NeoSilky

    Oh, well i've been taught wrong, thanks! :)
     
  6. Offline

    thehutch

    Well if you want to register your permissions you can it is highly recommended because people can just look at the plugin.yml for them. However you dont have to like I showed you early mainly dont register them if you don't know what their value will be like I showed you but if you do have a defined permission then do register them
     
  7. Offline

    NeoSilky

    Ahh right :D I didn't know that :p
     
  8. Offline

    thehutch

    Your welcome
     
    NeoSilky likes this.
Thread Status:
Not open for further replies.

Share This Page