mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01:00
Added some missing support for Nijikokun's Permissions in permissions manager
This commit is contained in:
parent
6dc4066563
commit
bb22daab33
@ -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<String> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user