Fix possible NPE - permissions in CommandDescriptions can be null
- Fix missed null situation during previous code changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user