Skip to content

Event ​

abstract class · pocketmine\event\Event · source

Properties ​

$eventName protected ​

php
protected ?string $eventName

Methods ​

call() ​

php
public function call() : void

Calls event handlers registered for this event.

getEventName() ​

php
final public function getEventName() : string

hasHandlers() ​

php
public static function hasHandlers() : bool

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()

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