mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Added McRegion detection to Anvil
This commit is contained in:
parent
3370052fac
commit
b2978133f7
@ -44,7 +44,18 @@ class Anvil extends BaseLevelProvider{
|
||||
|
||||
|
||||
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 = []){
|
||||
|
Loading…
x
Reference in New Issue
Block a user