mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-20 20:48:06 +00:00
Throw an exception when attempting to tick closed Levels
This commit is contained in:
parent
40a6f4dee9
commit
b5f473a3df
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user