mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-27 02:21:38 +01:00
Check for removed entity before targeting
This commit is contained in:
parent
fcc5bc4381
commit
37d528c5a2
@ -56,6 +56,11 @@ public class ClosestEntityTarget extends TargetSelector {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ent.isRemoved()) {
|
||||
// Entity not valid
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check if the entity type can be targeted
|
||||
final Class<? extends Entity> clazz = ent.getClass();
|
||||
boolean correct = false;
|
||||
|
Loading…
Reference in New Issue
Block a user