mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-16 15:45:21 +01:00
Merge pull request #101 from LeoDog896/master
Check for removed entity before targeting
This commit is contained in:
commit
1b1d74ceee
@ -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