mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-03 09:30:28 +01:00
Check for arraynull on pex group request.
This commit is contained in:
parent
27890e2b22
commit
71936cfe22
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user