Throw an exception when attempting to tick closed Levels

This commit is contained in:
Dylan K. Taylor 2017-03-31 13:14:05 +01:00
parent 40a6f4dee9
commit b5f473a3df

View File

@ -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();