Solved .getPlugin() error

Discussion in 'Plugin Development' started by x0pk1n, Apr 1, 2013.

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

    x0pk1n

    Okay so my error is that it all worked fine, with GroupManager and PermissionsEx; apart from when I use bpermissions. It just resorts to OP. I'm not sure why, nothing looks different to the other two. Can anyone see my stupid error?

    Code:java
    1.  
    2. if ((Bukkit.getServer().getPluginManager().getPlugin("PermissionsEx") != null)) {//See if Pex is avaible
    3. usePEXAsPerms = true ;
    4. Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "[AdminChannel] Using PermissionsEx.");
    5. } else if((Bukkit.getServer().getPluginManager().getPlugin("bpermissions") != null)){//See if bperm is avaible
    6. useBPERMAsPerms = true ;
    7. Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "[AdminChannel] Using bpermissions.");
    8. } else if((Bukkit.getServer().getPluginManager().getPlugin("GroupManager") != null)){//See if groupmanager is avaible
    9. useGMAsPerms = true ;
    10. Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "[AdminChannel] Using GroupManager.");
    11. }else{
    12. useOPAsPerms = true;
    13. Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "[AdminChannel] Using Op.");
    14. }
    15.  
    16. [/syntax=java]
     
  2. Offline

    skipperguy12

    OP's override permissions, I don't know if this is changeable. Look into bPermissions config?
     
  3. Offline

    x0pk1n

    I'm not sure I explained this correctly. Basically this code i supplied looks for the 3 comparable persimmon managers and prints out what it is using for permissions. It checks if the plugin is there, if so then uses it as the permission manager. It can't find bperm for some reason, maybe if this was in the Java syntax it would be easier to see. How do I put it into a Java syntax?
     
  4. Offline

    Tirelessly

    Try getting the case right?
     
  5. Offline

    x0pk1n

    Tirelessly You're right, the name it is downloaded is diffirent to the name it actually has. I printed out the names off all the plugins in the console to see!
     
Thread Status:
Not open for further replies.

Share This Page