mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +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:
@ -254,6 +254,9 @@ abstract class Tile extends Position{
|
||||
}
|
||||
|
||||
final public function scheduleUpdate() : void{
|
||||
if($this->closed){
|
||||
throw new \InvalidStateException("Cannot schedule update on garbage tile " . get_class($this));
|
||||
}
|
||||
$this->level->updateTiles[$this->id] = $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user