mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-12-29 12:28:35 +01:00
Revert "fix PEX primary group, they sort by rank in reverse (first is lowest rank)."
This reverts commit 7faa28f069
.
This commit is contained in:
parent
7faa28f069
commit
69c3b3b786
@ -199,10 +199,8 @@ public class Permission_PermissionsEx extends Permission {
|
|||||||
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
|
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
} else if (user.getGroupsNames(world).length > 0) {
|
||||||
String[] groupNames = user.getGroupsNames();
|
return user.getGroupsNames(world)[0];
|
||||||
if (groupNames.length > 0) {
|
|
||||||
return groupNames[groupNames.length - 1];
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -273,9 +271,8 @@ public class Permission_PermissionsEx extends Permission {
|
|||||||
@Override
|
@Override
|
||||||
public String[] getGroups() {
|
public String[] getGroups() {
|
||||||
PermissionGroup[] groups = PermissionsEx.getPermissionManager().getGroups();
|
PermissionGroup[] groups = PermissionsEx.getPermissionManager().getGroups();
|
||||||
if (groups == null || groups.length == 0) {
|
if (groups == null || groups.length == 0)
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
String[] groupNames = new String[groups.length];
|
String[] groupNames = new String[groups.length];
|
||||||
for (int i = 0; i < groups.length; i++) {
|
for (int i = 0; i < groups.length; i++) {
|
||||||
groupNames[i] = groups[i].getName();
|
groupNames[i] = groups[i].getName();
|
||||||
|
Loading…
Reference in New Issue
Block a user