PocketMine-MP 5.15.1 git-5ef247620a7c6301a849b54e5ef1009217729fc8
pocketmine\world\format\io\WritableWorldProviderManagerEntry Class Reference
+ Inheritance diagram for pocketmine\world\format\io\WritableWorldProviderManagerEntry:
+ Collaboration diagram for pocketmine\world\format\io\WritableWorldProviderManagerEntry:

Public Member Functions

 __construct (\Closure $isValid, private \Closure $fromPath, private \Closure $generate)
 
 fromPath (string $path, \Logger $logger)
 
 generate (string $path, string $name, WorldCreationOptions $options)
 
 isValid (string $path)
 

Detailed Description

@phpstan-type FromPath \Closure(string $path, \Logger $logger) : WritableWorldProvider @phpstan-type Generate \Closure(string $path, string $name, WorldCreationOptions $options) : void

Definition at line 32 of file WritableWorldProviderManagerEntry.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\format\io\WritableWorldProviderManagerEntry::__construct ( \Closure  $isValid,
private \Closure  $fromPath,
private \Closure  $generate 
)

@phpstan-param FromPath $fromPath @phpstan-param Generate $generate

Definition at line 38 of file WritableWorldProviderManagerEntry.php.

Member Function Documentation

◆ fromPath()

pocketmine\world\format\io\WritableWorldProviderManagerEntry::fromPath ( string  $path,
\Logger  $logger 
)
Exceptions
CorruptedWorldException
UnsupportedWorldFormatException

Reimplemented from pocketmine\world\format\io\WorldProviderManagerEntry.

Definition at line 46 of file WritableWorldProviderManagerEntry.php.

◆ generate()

pocketmine\world\format\io\WritableWorldProviderManagerEntry::generate ( string  $path,
string  $name,
WorldCreationOptions  $options 
)

Generates world manifest files and any other things needed to initialize a new world on disk

Definition at line 53 of file WritableWorldProviderManagerEntry.php.

◆ isValid()

pocketmine\world\format\io\WorldProviderManagerEntry::isValid ( string  $path)
inherited

Tells if the path is a valid world. This must tell if the current format supports opening the files in the directory

Definition at line 43 of file WorldProviderManagerEntry.php.


The documentation for this class was generated from the following file: