PocketMine-MP 5.18.1 git-9381fc4172e5dce4cada1cb356050c8a2ab57b94
|
Public Member Functions | |
onBlockChanged (Vector3 $block) | |
onChunkChanged (int $chunkX, int $chunkZ, Chunk $chunk) | |
onChunkLoaded (int $chunkX, int $chunkZ, Chunk $chunk) | |
onChunkPopulated (int $chunkX, int $chunkZ, Chunk $chunk) | |
onChunkUnloaded (int $chunkX, int $chunkZ, Chunk $chunk) | |
This interface allows you to listen for events occurring on or in specific chunks. This will receive events for any chunks which it is registered to listen to.
WARNING: When you're done with the listener, make sure you unregister it from all chunks it's listening to, otherwise the object will not be destroyed. The listener WILL NOT be unregistered when chunks are unloaded. You need to do this yourself when you're done with a chunk.
Definition at line 41 of file ChunkListener.php.
pocketmine\world\ChunkListener::onBlockChanged | ( | Vector3 | $block | ) |
This method will be called when a block changes in a registered chunk
Implemented in pocketmine\network\mcpe\cache\ChunkCache.
pocketmine\world\ChunkListener::onChunkChanged | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk | ||
) |
This method will be called when a Chunk is replaced by a new one
Implemented in pocketmine\network\mcpe\cache\ChunkCache, and pocketmine\player\Player.
pocketmine\world\ChunkListener::onChunkLoaded | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk | ||
) |
This method will be called when a registered chunk is loaded
pocketmine\world\ChunkListener::onChunkPopulated | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk | ||
) |
This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()
pocketmine\world\ChunkListener::onChunkUnloaded | ( | int | $chunkX, |
int | $chunkZ, | ||
Chunk | $chunk | ||
) |
This method will be called when a registered chunk is unloaded
Implemented in pocketmine\network\mcpe\cache\ChunkCache, and pocketmine\player\Player.