PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\event\HandlerList Class Reference
+ Collaboration diagram for pocketmine\event\HandlerList:

Public Member Functions

 __construct (private string $class, private ?HandlerList $parentList, private RegisteredListenerCache $handlerCache=new RegisteredListenerCache())
 
 clear ()
 
 getListenerList ()
 
 getListenersByPriority (int $priority)
 
 getParent ()
 
 register (RegisteredListener $listener)
 
 registerAll (array $listeners)
 
 unregister (RegisteredListener|Plugin|Listener $object)
 

Detailed Description

Definition at line 32 of file HandlerList.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\event\HandlerList::__construct ( private string $class,
private ?HandlerList $parentList,
private RegisteredListenerCache $handlerCache = new RegisteredListenerCache() )

@phpstan-param class-string<covariant Event> $class

Definition at line 42 of file HandlerList.php.

Member Function Documentation

◆ clear()

pocketmine\event\HandlerList::clear ( )

Definition at line 90 of file HandlerList.php.

◆ getListenerList()

pocketmine\event\HandlerList::getListenerList ( )
Returns
RegisteredListener[] @phpstan-return list<RegisteredListener>

Definition at line 119 of file HandlerList.php.

◆ getListenersByPriority()

pocketmine\event\HandlerList::getListenersByPriority ( int $priority)
Returns
RegisteredListener[]

Definition at line 98 of file HandlerList.php.

◆ getParent()

pocketmine\event\HandlerList::getParent ( )

Definition at line 102 of file HandlerList.php.

◆ register()

pocketmine\event\HandlerList::register ( RegisteredListener $listener)
Exceptions

Exception

Definition at line 55 of file HandlerList.php.

◆ registerAll()

pocketmine\event\HandlerList::registerAll ( array $listeners)
Parameters
RegisteredListener[]$listeners

Definition at line 66 of file HandlerList.php.

◆ unregister()

pocketmine\event\HandlerList::unregister ( RegisteredListener|Plugin|Listener $object)

Definition at line 73 of file HandlerList.php.


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