Skip to content

PlayerDuplicateLoginEvent ​

class · pocketmine\event\player\PlayerDuplicateLoginEvent · source

Extends Event
Implements Cancellable

Called when a player connects with a username or UUID that is already used by another player on the server. If cancelled, the newly connecting session will be disconnected; otherwise, the existing player will be disconnected.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\network\mcpe\NetworkSession $connectingSession, \pocketmine\network\mcpe\NetworkSession $existingSession, \pocketmine\lang\Translatable|string $disconnectReason, \pocketmine\lang\Translatable|string|null $disconnectScreenMessage)

getConnectingSession() ​

php
public function getConnectingSession() : \pocketmine\network\mcpe\NetworkSession

getExistingSession() ​

php
public function getExistingSession() : \pocketmine\network\mcpe\NetworkSession

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