Skip to content

StructureLocators 5.46.0 ​

final class · pocketmine\world\generator\structure\StructureLocators · source

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\StructureLocator

The locator for the world: its own, or its generator's, or null.

hasGeneratorLocator() ​

php
public static function hasGeneratorLocator(string $generatorName) : bool

registerForGenerator() ​

php
public static function registerForGenerator(string $generatorName, \pocketmine\world\generator\structure\StructureLocator $locator) : void

registerForWorld() ​

php
public static function registerForWorld(\pocketmine\world\World $world, \pocketmine\world\generator\structure\StructureLocator $locator) : void

Registers a locator for one world (forgotten when the world is unloaded and garbage-collected).

unregisterForGenerator() ​

php
public static function unregisterForGenerator(string $generatorName) : void

unregisterForWorld() ​

php
public static function unregisterForWorld(\pocketmine\world\World $world) : void

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