mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
PlayerTransferEvent: add documentation
This commit is contained in:
parent
8ecf9717d6
commit
4a3e42f82e
@ -27,6 +27,9 @@ use pocketmine\event\Cancellable;
|
|||||||
use pocketmine\event\CancellableTrait;
|
use pocketmine\event\CancellableTrait;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a player attempts to be transferred to another server, e.g. by using /transferserver.
|
||||||
|
*/
|
||||||
class PlayerTransferEvent extends PlayerEvent implements Cancellable{
|
class PlayerTransferEvent extends PlayerEvent implements Cancellable{
|
||||||
use CancellableTrait;
|
use CancellableTrait;
|
||||||
|
|
||||||
@ -44,26 +47,44 @@ class PlayerTransferEvent extends PlayerEvent implements Cancellable{
|
|||||||
$this->message = $message;
|
$this->message = $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the destination server address. This could be an IP or a domain name.
|
||||||
|
*/
|
||||||
public function getAddress() : string{
|
public function getAddress() : string{
|
||||||
return $this->address;
|
return $this->address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the destination server address.
|
||||||
|
*/
|
||||||
public function setAddress(string $address) : void{
|
public function setAddress(string $address) : void{
|
||||||
$this->address = $address;
|
$this->address = $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the destination server port.
|
||||||
|
*/
|
||||||
public function getPort() : int{
|
public function getPort() : int{
|
||||||
return $this->port;
|
return $this->port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the destination server port.
|
||||||
|
*/
|
||||||
public function setPort(int $port) : void{
|
public function setPort(int $port) : void{
|
||||||
$this->port = $port;
|
$this->port = $port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the disconnect reason shown in the server log and on the console.
|
||||||
|
*/
|
||||||
public function getMessage() : string{
|
public function getMessage() : string{
|
||||||
return $this->message;
|
return $this->message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the disconnect reason shown in the server log and on the console.
|
||||||
|
*/
|
||||||
public function setMessage(string $message) : void{
|
public function setMessage(string $message) : void{
|
||||||
$this->message = $message;
|
$this->message = $message;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user