mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Merge branch 'master' into 0.17-chunks
This commit is contained in:
@ -62,6 +62,6 @@ abstract class LevelProviderManager{
|
||||
public static function getProviderByName($name){
|
||||
$name = trim(strtolower($name));
|
||||
|
||||
return isset(self::$providers[$name]) ? self::$providers[$name] : null;
|
||||
return self::$providers[$name] ?? null;
|
||||
}
|
||||
}
|
@ -311,7 +311,7 @@ class McRegion extends BaseLevelProvider{
|
||||
}
|
||||
|
||||
public function unloadChunk($x, $z, $safe = true){
|
||||
$chunk = isset($this->chunks[$index = Level::chunkHash($x, $z)]) ? $this->chunks[$index] : null;
|
||||
$chunk = $this->chunks[$index = Level::chunkHash($x, $z)] ?? null;
|
||||
if($chunk instanceof Chunk and $chunk->unload(false, $safe)){
|
||||
unset($this->chunks[$index]);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user