mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge remote-tracking branch 'origin/stable' into master
# Conflicts: # composer.json # composer.lock # src/CrashDump.php # src/pocketmine/Server.php # src/pocketmine/level/format/io/region/McRegion.php # tests/phpstan/configs/check-explicit-mixed-baseline.neon # tests/phpstan/configs/l7-baseline.neon # tests/phpstan/configs/l8-baseline.neon # tests/travis/setup-php.yml
This commit is contained in:
@ -62,7 +62,8 @@ abstract class RegionWorldProvider extends BaseWorldProvider{
|
||||
public static function isValid(string $path) : bool{
|
||||
if(file_exists($path . "/level.dat") and is_dir($path . "/region/")){
|
||||
foreach(scandir($path . "/region/", SCANDIR_SORT_NONE) as $file){
|
||||
if(substr($file, strrpos($file, ".") + 1) === static::getRegionFileExtension()){
|
||||
$extPos = strrpos($file, ".");
|
||||
if($extPos !== false && substr($file, $extPos + 1) === static::getRegionFileExtension()){
|
||||
//we don't care if other region types exist, we only care if this format is possible
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user