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:
TheMode 2021-11-08 23:39:00 +01:00
parent 1340764907
commit c8ccc62525

View File

@ -536,6 +536,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
while ((callback = nextTick.poll()) != null) {
callback.accept(this);
}
if (isRemoved()) return;
}
// Entity tick