mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added worlds directive to pocketmine.yml to load extra worlds or use a plugin-provided generator
This commit is contained in:
@ -30,7 +30,7 @@ abstract class Generator{
|
||||
private static $list = [];
|
||||
|
||||
public static function addGenerator($object, $name){
|
||||
if(is_subclass_of($object, "pocketmine\\level\\generator\\Generator") and !isset(Generator::$list[$name])){
|
||||
if(is_subclass_of($object, "pocketmine\\level\\generator\\Generator") and !isset(Generator::$list[$name = strtolower($name)])){
|
||||
Generator::$list[$name] = $object;
|
||||
|
||||
return true;
|
||||
@ -40,7 +40,7 @@ abstract class Generator{
|
||||
}
|
||||
|
||||
public static function getGenerator($name){
|
||||
if(isset(Generator::$list[$name])){
|
||||
if(isset(Generator::$list[$name = strtolower($name)])){
|
||||
return Generator::$list[$name];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user