PlayerCreationEvent
extends Event
in package
Allows the creation of players overriding the base Player class
Table of Contents
- MAX_EVENT_CALL_DEPTH = 50
- $eventName : string|null
- $baseClass : string
- $eventCallDepth : int
- $playerClass : string
- $session : NetworkSession
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- getAddress() : string
- getBaseClass() : string
- getEventName() : string
- getNetworkSession() : NetworkSession
- getPlayerClass() : string
- getPort() : int
- setBaseClass() : void
- setPlayerClass() : void
Constants
MAX_EVENT_CALL_DEPTH
private
mixed
MAX_EVENT_CALL_DEPTH
= 50
Properties
$eventName
protected
string|null
$eventName
= null
$baseClass
private
string
$baseClass
= \pocketmine\player\Player::class
Tags
$eventCallDepth
private
static int
$eventCallDepth
= 1
$playerClass
private
string
$playerClass
= \pocketmine\player\Player::class
Tags
$session
private
NetworkSession
$session
Methods
__construct()
public
__construct(NetworkSession $session) : mixed
Parameters
- $session : NetworkSession
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —getAddress()
public
getAddress() : string
Return values
string —getBaseClass()
public
getBaseClass() : string
Tags
Return values
string —getEventName()
public
final getEventName() : string
Return values
string —getNetworkSession()
public
getNetworkSession() : NetworkSession
Return values
NetworkSession —getPlayerClass()
public
getPlayerClass() : string
Tags
Return values
string —getPort()
public
getPort() : int
Return values
int —setBaseClass()
public
setBaseClass(string $class) : void
Parameters
- $class : string
Tags
Return values
void —setPlayerClass()
public
setPlayerClass(string $class) : void
Parameters
- $class : string