Skip to content

EventPriority ​

final class · pocketmine\event\EventPriority · source

List of event priorities

Events will be called in this order: LOWEST -> LOW -> NORMAL -> HIGH -> HIGHEST -> MONITOR

MONITOR events should not change the event outcome or contents

WARNING: If these values are changed, handler sorting in HandlerList::getListenerList() may need to be updated.

Constants ​

ALL ​

php
public const ALL = [self::LOWEST, self::LOW, self::NORMAL, self::HIGH, self::HIGHEST, self::MONITOR]

HIGH ​

php
public const HIGH = 2

Event call is of high importance

HIGHEST ​

php
public const HIGHEST = 1

Event call is critical and must have the final say in what happens to the event

LOW ​

php
public const LOW = 4

Event call is of low importance

LOWEST ​

php
public const LOWEST = 5

Event call is of very low importance and should be ran first, to allow other plugins to further customise the outcome

MONITOR ​

php
public const MONITOR = 0

Event is listened to purely for monitoring the outcome of an event.

No modifications to the event should be made under this priority

NORMAL ​

php
public const NORMAL = 3

Event call is neither important or unimportant, and may be ran normally. This is the default priority.

Methods ​

fromString() ​

php
public static function fromString(string $name) : int

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