fix ArrayOutOfBounds for bPerms2

This commit is contained in:
Sleaker 2012-02-29 07:05:03 -08:00
parent 5e4afbaa69
commit 90bf4d8d3a

View File

@ -150,7 +150,7 @@ public class Permission_bPermissions2 extends Permission {
@Override
public String getPrimaryGroup(String world, String player) {
String[] groups = getPlayerGroups(world, player);
return groups != null ? groups[0] : null;
return groups != null && groups.length > 0 ? groups[0] : null;
}
@Override