StructureLocators 5.46.0
Registry of StructureLocators queried by /locate structure: one per generator name (as registered in GeneratorManager, e.g. "vanilla", "vanilla_nether") and optionally one per world, which takes precedence. Without a locator, /locate structure tells the sender that the structure does not exist in the world.
Methods
get()
php
public static function get(\pocketmine\world\World $world) : ?\pocketmine\world\generator\structure\StructureLocatorThe locator for the world: its own, or its generator's, or null.
hasGeneratorLocator()
php
public static function hasGeneratorLocator(string $generatorName) : boolregisterForGenerator()
php
public static function registerForGenerator(string $generatorName, \pocketmine\world\generator\structure\StructureLocator $locator) : voidregisterForWorld()
php
public static function registerForWorld(\pocketmine\world\World $world, \pocketmine\world\generator\structure\StructureLocator $locator) : voidRegisters a locator for one world (forgotten when the world is unloaded and garbage-collected).
unregisterForGenerator()
php
public static function unregisterForGenerator(string $generatorName) : voidunregisterForWorld()
php
public static function unregisterForWorld(\pocketmine\world\World $world) : void