mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
Optimize getEntitiesByClasses slightly
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
700f1c0ef8
commit
260bd8c7c4
1 changed files with 4 additions and 2 deletions
|
@ -885,8 +885,10 @@ public class CraftWorld implements World {
|
||||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||||
|
|
||||||
for (Class<?> clazz : classes) {
|
for (Class<?> clazz : classes) {
|
||||||
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
if (clazz.isAssignableFrom(bukkitClass)) {
|
||||||
|
if (bukkitEntity.isValid()) {
|
||||||
list.add(bukkitEntity);
|
list.add(bukkitEntity);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue