mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
fixed crash on dev build self-shutdown
This commit is contained in:
parent
48a99937b9
commit
1ebc101ded
@ -1710,10 +1710,12 @@ class Server{
|
|||||||
$player->close($player->getLeaveMessage(), $this->getProperty("settings.shutdown-message", "Server closed"));
|
$player->close($player->getLeaveMessage(), $this->getProperty("settings.shutdown-message", "Server closed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->levelManager instanceof LevelManager){
|
||||||
$this->getLogger()->debug("Unloading all levels");
|
$this->getLogger()->debug("Unloading all levels");
|
||||||
foreach($this->levelManager->getLevels() as $level){
|
foreach($this->levelManager->getLevels() as $level){
|
||||||
$this->levelManager->unloadLevel($level, true);
|
$this->levelManager->unloadLevel($level, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->getLogger()->debug("Removing event handlers");
|
$this->getLogger()->debug("Removing event handlers");
|
||||||
HandlerList::unregisterAll();
|
HandlerList::unregisterAll();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user