PocketMine-MP 5.15.1 git-08c6e63aac45a450fe3b437616ee8aa2500e04e2
pocketmine\event\player\PlayerEvent Class Reference
+ Inheritance diagram for pocketmine\event\player\PlayerEvent:
+ Collaboration diagram for pocketmine\event\player\PlayerEvent:

Public Member Functions

 call ()
 
 getEventName ()
 
 getPlayer ()
 

Static Public Member Functions

static hasHandlers ()
 

Protected Attributes

string $eventName = null
 
Player $player
 

Detailed Description

Definition at line 32 of file PlayerEvent.php.

Member Function Documentation

◆ call()

pocketmine\event\Event::call ( )
inherited

Calls event handlers registered for this event.

Exceptions

RuntimeException if event call recursion reaches the max depth limit

Definition at line 49 of file Event.php.

◆ getEventName()

pocketmine\event\Event::getEventName ( )
finalinherited

Definition at line 40 of file Event.php.

◆ getPlayer()

pocketmine\event\player\PlayerEvent::getPlayer ( )

Definition at line 35 of file PlayerEvent.php.

◆ hasHandlers()

static pocketmine\event\Event::hasHandlers ( )
staticinherited

Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.

Usage: SomeEventClass::hasHandlers()

Definition at line 77 of file Event.php.

Member Data Documentation

◆ $eventName

string pocketmine\event\Event::$eventName = null
protectedinherited

Definition at line 38 of file Event.php.

◆ $player

Player pocketmine\event\player\PlayerEvent::$player
protected

Definition at line 33 of file PlayerEvent.php.


The documentation for this class was generated from the following file: