mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 17:31:06 +01:00
Optimize getEntitiesByClasses slightly
This commit is contained in:
parent
e81013d786
commit
f424222672
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