mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Ooops, ;)
This commit is contained in:
parent
5bdb61117f
commit
5057a3965e
@ -95,7 +95,7 @@ abstract class BaseEvent{
|
|||||||
static::$handlerPriority = array();
|
static::$handlerPriority = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function register(callable $handler, $priority = EventPriority::NORMAL){
|
public static function register(callable $handler, $priority = EventPriority::NORMAL){
|
||||||
if($priority < EventPriority::MONITOR or $priority > EventPriority::LOWEST){
|
if($priority < EventPriority::MONITOR or $priority > EventPriority::LOWEST){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ abstract class BaseEvent{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unregister(callable $handler, $priority = EventPriority::NORMAL){
|
public static function unregister(callable $handler, $priority = EventPriority::NORMAL){
|
||||||
$identifier = Utils::getCallableIdentifier($handler);
|
$identifier = Utils::getCallableIdentifier($handler);
|
||||||
if(isset(static::$handlers[$identifier])){
|
if(isset(static::$handlers[$identifier])){
|
||||||
if(isset(static::$handlerPriority[(int) $priority][$identifier])){
|
if(isset(static::$handlerPriority[(int) $priority][$identifier])){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user