diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java index 68dc3fe50..cb6d849aa 100644 --- a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java +++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java @@ -25,7 +25,14 @@ public class PermissionsExHandler extends SuperpermsHandler { return null; } - return user.getGroupsNames()[0]; + + String[] groupsNames = user.getGroupsNames(); + if (groupsNames == null) + { + return null; + } + + return groupsNames[0]; } @Override @@ -36,7 +43,14 @@ public class PermissionsExHandler extends SuperpermsHandler { return null; } - return Arrays.asList(user.getGroupsNames()); + + String[] groupsNames = user.getGroupsNames(); + if (groupsNames == null) + { + return null; + } + + return Arrays.asList(groupsNames); } @Override |