mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-11 02:07:38 +00:00
Made getGroups() work properly for nijiperms.
This commit is contained in:
parent
8ea980a303
commit
37f8b8927a
2
pom.xml
2
pom.xml
@ -34,7 +34,7 @@
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>dummypermscompat</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Bukkit -->
|
||||
|
@ -101,16 +101,18 @@ public class NijiPermissionsResolver implements PermissionsResolver {
|
||||
try {
|
||||
Player player = server.getPlayer(name);
|
||||
if (player == null) return new String[0];
|
||||
String group;
|
||||
String[] groups = null;
|
||||
try {
|
||||
group = api.getHandler().getGroup(player.getWorld().getName(), player.getName());
|
||||
groups = api.getHandler().getGroups(player.getWorld().getName(), player.getName());
|
||||
} catch (Throwable t) {
|
||||
group = api.Security.getGroup(player.getName());
|
||||
String group = api.Security.getGroup(player.getWorld().getName(), player.getName());
|
||||
if (group != null)
|
||||
groups = new String[] {group};
|
||||
}
|
||||
if (group == null) {
|
||||
if (groups == null) {
|
||||
return new String[0];
|
||||
} else {
|
||||
return new String[]{ group };
|
||||
return groups;
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user