mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Fixed handlerPriority order
This commit is contained in:
parent
2f44e5e76d
commit
0ef4318f6f
1 changed files with 2 additions and 1 deletions
|
|
@ -106,6 +106,7 @@ abstract class BaseEvent{
|
||||||
static::$handlers[$identifier] = $handler;
|
static::$handlers[$identifier] = $handler;
|
||||||
if(!isset(static::$handlerPriority[(int) $priority])){
|
if(!isset(static::$handlerPriority[(int) $priority])){
|
||||||
static::$handlerPriority[(int) $priority] = array();
|
static::$handlerPriority[(int) $priority] = array();
|
||||||
|
krsort(static::$handlerPriority);
|
||||||
}
|
}
|
||||||
static::$handlerPriority[(int) $priority][$identifier] = $handler;
|
static::$handlerPriority[(int) $priority][$identifier] = $handler;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue