mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-03-12 06:29:30 +01:00
Check for null values better.
This commit is contained in:
parent
690c7349a8
commit
2aa29b3c81
@ -73,7 +73,8 @@ public class ActiveMinionHolder implements IActiveHolder {
|
||||
// this.livingEntityMap.clear();
|
||||
|
||||
// grab list of all valid entities by UUID that can be removed
|
||||
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream().filter(Objects::nonNull)
|
||||
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
|
||||
.filter(e -> e != null && e.getValue() != null && ServerUtils.get().getEntity(e.getValue()) != null)
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
|
||||
.entrySet().stream()
|
||||
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
||||
|
Loading…
Reference in New Issue
Block a user