3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +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> <dependency>
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
<artifactId>dummypermscompat</artifactId> <artifactId>dummypermscompat</artifactId>
<version>1.2</version> <version>1.3</version>
</dependency> </dependency>
<!-- Bukkit --> <!-- Bukkit -->

Datei anzeigen

@ -101,16 +101,18 @@ public class NijiPermissionsResolver implements PermissionsResolver {
try { try {
Player player = server.getPlayer(name); Player player = server.getPlayer(name);
if (player == null) return new String[0]; if (player == null) return new String[0];
String group; String[] groups = null;
try { try {
group = api.getHandler().getGroup(player.getWorld().getName(), player.getName()); groups = api.getHandler().getGroups(player.getWorld().getName(), player.getName());
} catch (Throwable t) { } 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]; return new String[0];
} else { } else {
return new String[]{ group }; return groups;
} }
} catch (Throwable t) { } catch (Throwable t) {
t.printStackTrace(); t.printStackTrace();