Skip to content

GeneratorManager ​

final class · pocketmine\world\generator\GeneratorManager · source

Methods ​

__construct() ​

php
public function __construct()

addAlias() ​

php
public function addAlias(string $name, string $alias) : void

Aliases an already-registered generator name to another name. Useful if you want to map a generator name to an existing generator without having to replicate the parameters.

addGenerator() ​

php
public function addGenerator(string $class, string $name, \Closure $presetValidator, bool $overwrite = false, bool $fast = false, ?\pocketmine\world\dimension\Dimension $dimension = null) : void

getDimensionGenerator() 5.46.0 ​

php
public function getDimensionGenerator(string $generatorName, \pocketmine\world\dimension\Dimension $dimension) : ?string

Returns the name of the generator for the linked world of the given dimension of worlds made with $generatorName, or null if there is none (the dimension's default generator is used then).

getGenerator() ​

php
public function getGenerator(string $name) : ?\pocketmine\world\generator\GeneratorManagerEntry

Returns the generator entry of a registered Generator matching the given name, or null if not found.

getGeneratorList() ​

php
public function getGeneratorList() : array

Returns a list of names for registered generators.

getGeneratorName() ​

php
public function getGeneratorName(string $class) : string

Returns the registered name of the given Generator class.

setDimensionGenerator() 5.46.0 ​

php
public function setDimensionGenerator(string $generatorName, \pocketmine\world\dimension\Dimension $dimension, string $dimensionGeneratorName) : void

Sets the generator used to create the linked world of the given dimension (e.g. "world_nether") of worlds made with the generator $generatorName. Without one, the dimension's default generator is used (see Dimension::getDefaultGeneratorName()). The linked world gets the same generator options as the world.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.