Solved Getting children from permissions node

Discussion in 'Plugin Development' started by MrZoraman, Jul 2, 2013.

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

    MrZoraman

    Some plugins on the server have permission nodes with children permissions set up in their plugin.ymls, and when I do
    Code:
    (new Permission("<<node with children>>")).getChildren().keySet())
    it comes up empty. Is there a step that I am missing?

    Thanks!
    -Z
     
  2. Offline

    Alex5657

    That is because you initialize a new empty object. Instead of
    Code:
    (new Permission("<<node with children>>"))
    
    Use:

    Code:
    getServer().getPluginManager().getPermission("<<node with children>>")
    
     
    MrZoraman likes this.
  3. Offline

    MrZoraman

    Thank you! Worked perfectly :)
     
Thread Status:
Not open for further replies.

Share This Page