mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added exception throws when a closed tile or entity attempts to schedule itself for updating
I can't believe it took so long to find what was causing these stdClass bugs.
This commit is contained in:
@ -1377,6 +1377,9 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
}
|
||||
|
||||
final public function scheduleUpdate() : void{
|
||||
if($this->closed){
|
||||
throw new \InvalidStateException("Cannot schedule update on garbage entity " . get_class($this));
|
||||
}
|
||||
$this->level->updateEntities[$this->id] = $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user