SPIGOT-5010: World#getEntitiesByClass/es also return entities in border chunks.

This commit is contained in:
blablubbabc 2019-06-15 03:39:04 +02:00 committed by md_5
parent 43431ba65b
commit 30a6337982

View File

@ -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;
}