Merge commit '799183e13e61e89cc6820ad3132a4147454017c6'

# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/level/format/io/LevelProviderManager.php
#	src/pocketmine/tile/Tile.php
#	src/world/generator/GeneratorManager.php
This commit is contained in:
Dylan K. Taylor
2020-01-31 21:26:40 +00:00
6 changed files with 26 additions and 4 deletions

View File

@ -68,6 +68,9 @@ abstract class WorldProviderManager{
self::$default = $class;
}
/**
* @phpstan-param class-string<WorldProvider> $class
*/
public static function addProvider(string $class, string $name, bool $overwrite = false) : void{
Utils::testValidInstance($class, WorldProvider::class);
@ -105,6 +108,8 @@ abstract class WorldProviderManager{
/**
* Returns a WorldProvider by name, or null if not found
*
* @phpstan-return class-string<WorldProvider>|null
*/
public static function getProviderByName(string $name) : ?string{
return self::$providers[trim(strtolower($name))] ?? null;