mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 14:04:49 +01:00
SPIGOT-5010: World.getEntities returns entities in border chunks
This commit is contained in:
parent
455023c4bb
commit
b7fea42777
1 changed files with 2 additions and 2 deletions
|
@ -811,7 +811,7 @@ public class CraftWorld implements World {
|
|||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
||||
// Assuming that bukkitEntity isn't null
|
||||
if (bukkitEntity != null) {
|
||||
if (bukkitEntity != null && bukkitEntity.isValid()) {
|
||||
list.add(bukkitEntity);
|
||||
}
|
||||
}
|
||||
|
@ -830,7 +830,7 @@ public class CraftWorld implements World {
|
|||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
||||
// Assuming that bukkitEntity isn't null
|
||||
if (bukkitEntity != null && bukkitEntity instanceof LivingEntity) {
|
||||
if (bukkitEntity != null && bukkitEntity instanceof LivingEntity && bukkitEntity.isValid()) {
|
||||
list.add((LivingEntity) bukkitEntity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue