diff --git a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java index 2123cab..1e74413 100644 --- a/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java +++ b/src/net/milkbowl/vault/permission/plugins/Permission_PermissionsEx.java @@ -199,10 +199,8 @@ public class Permission_PermissionsEx extends Permission { PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName); if (user == null) { return null; - } - String[] groupNames = user.getGroupsNames(); - if (groupNames.length > 0) { - return groupNames[groupNames.length - 1]; + } else if (user.getGroupsNames(world).length > 0) { + return user.getGroupsNames(world)[0]; } else { return null; } @@ -273,9 +271,8 @@ public class Permission_PermissionsEx extends Permission { @Override public String[] getGroups() { PermissionGroup[] groups = PermissionsEx.getPermissionManager().getGroups(); - if (groups == null || groups.length == 0) { + if (groups == null || groups.length == 0) return null; - } String[] groupNames = new String[groups.length]; for (int i = 0; i < groups.length; i++) { groupNames[i] = groups[i].getName();