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:
Ursprung
8ea980a303
Commit
37f8b8927a
2
pom.xml
2
pom.xml
@ -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 -->
|
||||||
|
@ -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();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren