mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-09-28 21:37:33 +02:00
Require not null bosses.
This commit is contained in:
parent
010ac0ad15
commit
63a88682ce
@ -105,6 +105,7 @@ public class ActiveBossHolder implements IActiveHolder {
|
|||||||
|
|
||||||
// grab list of all valid entities by UUID that can be removed
|
// grab list of all valid entities by UUID that can be removed
|
||||||
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
|
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
|
||||||
|
.filter(Objects::nonNull) // This may fix ticket #4522
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
|
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
|
||||||
.entrySet().stream()
|
.entrySet().stream()
|
||||||
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
||||||
|
Loading…
Reference in New Issue
Block a user