mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Throw an exception when attempting to tick closed Levels
This commit is contained in:
@ -645,6 +645,9 @@ class Level implements ChunkManager, Metadatable{
|
||||
*
|
||||
*/
|
||||
public function doTick(int $currentTick){
|
||||
if($this->closed){
|
||||
throw new \InvalidStateException("Attempted to tick a Level which has been closed");
|
||||
}
|
||||
|
||||
$this->timings->doTick->startTiming();
|
||||
|
||||
|
Reference in New Issue
Block a user