mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added LevelUnloadEvent
This commit is contained in:
@ -840,11 +840,16 @@ class Server{
|
||||
/**
|
||||
* @param Level $level
|
||||
* @param bool $forceUnload
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function unloadLevel(Level $level, $forceUnload = false){
|
||||
if($level->unload($forceUnload) === true and $this->isLevelLoaded($level->getFolderName())){
|
||||
unset($this->levels[$level->getID()]);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user