Possible fix for #2046, removed embedded class names

This commit is contained in:
Shoghi Cervantes
2014-09-19 09:44:58 +02:00
parent 8c627bd0af
commit d312d2a143
13 changed files with 35 additions and 28 deletions

View File

@ -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 = strtolower($name)])){
if(is_subclass_of($object, Generator::class) and !isset(Generator::$list[$name = strtolower($name)])){
Generator::$list[$name] = $object;
return true;
@ -44,7 +44,7 @@ abstract class Generator{
return Generator::$list[$name];
}
return "pocketmine\\level\\generator\\Normal";
return Normal::class;
}
public static function getGeneratorName($class){