mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 07:41:30 +01:00
Optimize getEntitiesByClasses slightly
This commit is contained in:
parent
e81013d786
commit
f424222672
@ -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 New Issue
Block a user