Fixed Events being called with reversed priority

This commit is contained in:
Shoghi Cervantes 2014-05-24 13:40:05 +02:00
parent abff932d8f
commit f9353a0ecd
2 changed files with 11 additions and 6 deletions

View File

@ -23,7 +23,12 @@ namespace pocketmine\event;
/**
* List of event prioritoes
* 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
*/
abstract class EventPriority{
/**

View File

@ -70,12 +70,12 @@ class HandlerList{
public function __construct(){
$this->handlerSlots = array(
EventPriority::MONITOR => [],
EventPriority::HIGHEST => [],
EventPriority::HIGH => [],
EventPriority::NORMAL => [],
EventPriority::LOWEST => [],
EventPriority::LOW => [],
EventPriority::LOWEST => []
EventPriority::NORMAL => [],
EventPriority::HIGH => [],
EventPriority::HIGHEST => [],
EventPriority::MONITOR => []
);
self::$allLists[] = $this;
}