PlayerViewDistanceChangeEvent
Extends PlayerEvent
Called when a player requests a different viewing distance than the current one.
Properties
$newDistance
php
public int $newDistance$oldDistance
php
public int $oldDistanceMethods
__construct()
php
public function __construct(\pocketmine\player\Player $player, int $oldDistance, int $newDistance)getNewDistance()
php
public function getNewDistance() : intReturns the new view radius, measured in chunks.
getOldDistance()
php
public function getOldDistance() : intReturns the old view radius, measured in chunks. A value of -1 means that the player has just connected and did not have a view distance before this event.
