mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:31:29 +01:00
SPIGOT-5010: World#getEntitiesByClass/es also return entities in border chunks.
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
c1cc0cddf5
commit
d53dd95127
@ -861,7 +861,7 @@ public class CraftWorld implements World {
|
||||
|
||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||
|
||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
||||
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
||||
list.add((T) bukkitEntity);
|
||||
}
|
||||
}
|
||||
@ -885,7 +885,7 @@ public class CraftWorld implements World {
|
||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||
|
||||
for (Class<?> clazz : classes) {
|
||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
||||
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
||||
list.add(bukkitEntity);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user