PlayerTransferEvent
Extends PlayerEvent
Implements Cancellable
Called when a player attempts to be transferred to another server, e.g. by using /transferserver.
Properties
$address
php
public string $address$message
php
public \pocketmine\lang\Translatable|string $message$port
php
public int $portMethods
__construct()
php
public function __construct(\pocketmine\player\Player $player, string $address, int $port, \pocketmine\lang\Translatable|string $message)getAddress()
php
public function getAddress() : stringReturns the destination server address. This could be an IP or a domain name.
getMessage()
php
public function getMessage() : \pocketmine\lang\Translatable|stringReturns the disconnect reason shown in the server log and on the console.
getPort()
php
public function getPort() : intReturns the destination server port.
setAddress()
php
public function setAddress(string $address) : voidSets the destination server address.
setMessage()
php
public function setMessage(\pocketmine\lang\Translatable|string $message) : voidSets the disconnect reason shown in the server log and on the console.
setPort()
php
public function setPort(int $port) : voidSets the destination server port.
