diff --git a/src/world/World.php b/src/world/World.php index 817b45730..8fff731dd 100644 --- a/src/world/World.php +++ b/src/world/World.php @@ -854,7 +854,7 @@ class World implements ChunkManager{ //Update entities that need update Timings::$tickEntity->startTiming(); foreach($this->updateEntities as $id => $entity){ - if($entity->isClosed() or !$entity->onUpdate($currentTick)){ + if($entity->isClosed() or $entity->isFlaggedForDespawn() or !$entity->onUpdate($currentTick)){ unset($this->updateEntities[$id]); } if($entity->isFlaggedForDespawn()){