Documentation

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
phpstan-var

class-string<Player>

$eventCallDepth

private static int $eventCallDepth = 1

$playerClass

private string $playerClass = \pocketmine\player\Player::class
Tags
phpstan-var

class-string<Player>

Methods

call()

Calls event handlers registered for this event.

public call() : void
Tags
throws
RuntimeException

if event call recursion reaches the max depth limit

Return values
void

getBaseClass()

public getBaseClass() : string
Tags
phpstan-return

class-string<Player>

Return values
string

getEventName()

public final getEventName() : string
Return values
string

getPlayerClass()

public getPlayerClass() : string
Tags
phpstan-return

class-string<Player>

Return values
string

setBaseClass()

public setBaseClass(string $class) : void
Parameters
$class : string
Tags
phpstan-param

class-string<Player> $class

Return values
void

setPlayerClass()

public setPlayerClass(string $class) : void
Parameters
$class : string
Tags
phpstan-param

class-string<Player> $class

Return values
void

Search results