Skip to content

PlayerProxyTransferEvent 5.46.0 ​

class · pocketmine\event\player\PlayerProxyTransferEvent · source

Extends PlayerEvent
Implements Cancellable

Called when a player of this server is about to be moved to another server of the pm-proxy network. The player stays connected: the proxy moves it without a reconnection. Cancel it to keep the player here (combat loggers, minigames).

It is called:

  • when the move is asked on this server (/server, /hub, \pocketmine\network\proxy\ProxyNetwork::transfer(), or Player::transfer() with the name of a server of the network), before the request goes to the proxy;
  • when the move comes from elsewhere (/send or a plugin on another server, the proxy's admin API), when the proxy is about to take the player. The target is then the server the proxy chose, and changing it has no effect.

Not called when the server stops and the proxy moves its players to the lobby. A player who is dead, or who gets hurt while the camera of a cinematic transfer flies up, stays here.

Properties ​

$style ​

php
public string $style

$target ​

php
public string $target

Methods ​

__construct() ​

php
public function __construct(\pocketmine\player\Player $player, string $target, string $style)

getStyle() ​

php
public function getStyle() : string

One of the STYLE_ constants of \pocketmine\network\proxy\ProxyNetwork, or "" for the proxy's default.

getTarget() ​

php
public function getTarget() : string

Server or group of the network the player goes to, or \pocketmine\network\proxy\ProxyNetwork::TARGET_HUB.

setStyle() ​

php
public function setStyle(string $style) : void

setTarget() ​

php
public function setTarget(string $target) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.