mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
Added McRegion detection to Anvil
This commit is contained in:
@ -44,7 +44,18 @@ class Anvil extends BaseLevelProvider{
|
|||||||
|
|
||||||
|
|
||||||
public static function isValid($path){
|
public static function isValid($path){
|
||||||
return file_exists($path . "/level.dat") and is_dir($path . "/region/");
|
$isValid = (file_exists($path . "/level.dat") and is_dir($path . "/region/"));
|
||||||
|
|
||||||
|
if($isValid){
|
||||||
|
$files = glob($path . "/region/*.mc*");
|
||||||
|
foreach($files as $f){
|
||||||
|
if(strpos($f, ".mcr") !== false){ //McRegion
|
||||||
|
$isValid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function generate($path, $name, $seed, $generator, array $options = []){
|
public static function generate($path, $name, $seed, $generator, array $options = []){
|
||||||
|
Reference in New Issue
Block a user