Fix possible NPE - permissions in CommandDescriptions can be null

- Fix missed null situation during previous code changes
This commit is contained in:
ljacqu 2015-12-06 01:13:12 +01:00
parent d5a1af0380
commit d059d4f00d

View File

@ -328,7 +328,8 @@ public class PermissionsManager implements PermissionsService {
}
public boolean hasPermission(Player player, CommandDescription command) {
if (CollectionUtils.isEmpty(command.getCommandPermissions().getPermissionNodes())) {
if (command.getCommandPermissions() == null
|| CollectionUtils.isEmpty(command.getCommandPermissions().getPermissionNodes())) {
return true;
}