mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user