PositionTrackingDB 5.46.0
Server-wide equivalent of the vanilla position tracking database: maps the tracking handles stored in lodestones and lodestone compasses ("trackingHandle") to the lodestone position. Vanilla keeps this per level in LevelDB; PocketMine keeps one table for all worlds in position_tracking.json in the server data folder, so a lodestone compass keeps working across worlds, but handles are not carried over when a world is copied to another server.
Methods
__construct()
php
public function __construct(?string $path = null)get()
php
public function get(int $handle) : ?arrayReturns the position registered for the handle, or null if it is unknown or was removed.
register()
php
public function register(string $worldFolderName, int $x, int $y, int $z) : intRegisters the given block position (world folder name and coordinates) and returns its new tracking handle.
remove()
php
public function remove(int $handle) : voidwasAssigned()
php
public function wasAssigned(int $handle) : boolReturns whether the handle was assigned at some point (it may have been removed since).
