mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Do not continue tick if entity has been removed in a nextTick task
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
1340764907
commit
c8ccc62525
@ -536,6 +536,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||||||
while ((callback = nextTick.poll()) != null) {
|
while ((callback = nextTick.poll()) != null) {
|
||||||
callback.accept(this);
|
callback.accept(this);
|
||||||
}
|
}
|
||||||
|
if (isRemoved()) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entity tick
|
// Entity tick
|
||||||
|
Loading…
Reference in New Issue
Block a user