3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Made getGroups() work properly for nijiperms.

Dieser Commit ist enthalten in:
zml2008 2011-08-04 21:58:14 -07:00
Ursprung 8ea980a303
Commit 37f8b8927a
2 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -34,7 +34,7 @@
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>dummypermscompat</artifactId>
<version>1.2</version>
<version>1.3</version>
</dependency>
<!-- Bukkit -->

Datei anzeigen

@ -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();