fix error when using killall

This commit is contained in:
aurora 2020-08-31 09:21:35 +00:00
parent e1aadc3a54
commit ddf7ccf22b
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class ActiveBossHolder implements IActiveHolder {
// grab list of all valid entities by UUID that can be removed
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
.filter(Objects::nonNull) // This may fix ticket #4522
.filter(e -> e != null && e.getValue() != null && ServerUtils.get().getEntity(e.getValue()) != null) // This may fix ticket #4522
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
.entrySet().stream()
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(