diff --git a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java index 0b075d45c..b0e8700d1 100644 --- a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java +++ b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java @@ -1,5 +1,6 @@ package fr.xephi.authme.permission; +import com.nijiko.permissions.Group; import com.nijiko.permissions.PermissionHandler; import com.nijikokun.bukkit.Permissions.Permissions; import de.bananaco.bpermissions.api.ApiLayer; @@ -466,6 +467,18 @@ public class PermissionsManager { // Vault return Arrays.asList(vaultPerms.getPlayerGroups(player)); + case PERMISSIONS: + // Permissions + // Create a list to put the groups in + List groups = new ArrayList<>(); + + // Get the groups and add each to the list + for(Group group : this.defaultPerms.getGroups(player.getName())) + groups.add(group.getName()); + + // Return the groups + return groups; + case NONE: // Not hooked into any permissions system, return an empty list return new ArrayList<>(); @@ -520,6 +533,10 @@ public class PermissionsManager { // Vault return vaultPerms.playerInGroup(player, groupName); + case PERMISSIONS: + // Permissions + return this.defaultPerms.inGroup(player.getWorld().getName(), player.getName(), groupName); + case NONE: // Not hooked into any permissions system, return an empty list return false; @@ -578,6 +595,11 @@ public class PermissionsManager { vaultPerms.playerAddGroup(player, groupName); return true; + case PERMISSIONS: + // Permissions + // FIXME: Add this method! + //return this.defaultPerms.group + case NONE: // Not hooked into any permissions system, return false return false; @@ -661,6 +683,11 @@ public class PermissionsManager { vaultPerms.playerRemoveGroup(player, groupName); return true; + case PERMISSIONS: + // Permissions + // FIXME: Add this method! + //return this.defaultPerms.group + case NONE: // Not hooked into any permissions system, return false return false; @@ -752,6 +779,11 @@ public class PermissionsManager { vaultPerms.playerAddGroup(player, groupName); return true; + case PERMISSIONS: + // Permissions + // FIXME: Add this method! + //return this.defaultPerms.group + case NONE: // Not hooked into any permissions system, return false return false;