Permissions not working

Discussion in 'Plugin Development' started by candyfloss20, Aug 20, 2014.

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

    candyfloss20

    So I've got this code for my servers plugin:
    Code:java
    1. if (p.getUniqueId().toString().equalsIgnoreCase(GIANS_UUID) || p.getUniqueId().toString().equalsIgnoreCase(NICKS_UUID) || p.getUniqueId().toString().equalsIgnoreCase(DYLANS_UUID)) {
    2. return "§4§lOWNER";
    3. }
    4. else if (p.getUniqueId().toString().equalsIgnoreCase(BRETTS_UUID) || p.getUniqueId().toString().equalsIgnoreCase(AIDANS_UUID)) {
    5. return "§c§lADMIN";
    6. }
    7. else if (p.hasPermission("xRank.VIP")) {
    8. return "§e§lVIP";
    9. }
    10. else if (p.hasPermission("xRank.MOD")) {
    11. return "§5§lMOD";
    12. }
    13. else if (p.hasPermission("xRank.DIAMOND")) {
    14. return "§b§lDIAMOND";
    15. }
    16. else if (p.hasPermission("xRank.GOLD")) {
    17. return "§6§lGOLD";
    18. }
    19. else if (p.hasPermission("xRank.IRON")) {
    20. return "§7§lIRON";
    21. }
    22. else if (p.hasPermission("xRank.MEMBER")) {
    23. return "§8§lMEMBER";
    24. }
    25. else {
    26. p.kickPlayer("§4§l>> §cFailed to download your Rank Data, Please retry Later §4§l<<");
    27. return "";
    28. }


    If the player's UUID is one of the owners or admins it works fine, If the player joining is OPed it returns VIP because its the 1st perm being checked, But if a player join (No Matter What Rank) it ALLWAYS returns: p.kickPlayer("§4§l>> §cFailed to download your Rank Data, Please retry Later §4§l<<");
    return "";
    Any ideas ?
    Regards candyfloss20
     
  2. Offline

    fandemangas42

    The player who joins the server doesn't have any of theses permissions, I suppose.
     
Thread Status:
Not open for further replies.

Share This Page