mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +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();
|
||||
|
||||
for (Class<?> clazz : classes) {
|
||||
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
||||
list.add(bukkitEntity);
|
||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
||||
if (bukkitEntity.isValid()) {
|
||||
list.add(bukkitEntity);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue