mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Possibly fix issues related to new lines on different operating systems and event listeners modifiers
This commit is contained in:
parent
20e63ae543
commit
79236c971c
@ -694,13 +694,13 @@ class PluginManager{
|
||||
if(!$method->isStatic()){
|
||||
$priority = EventPriority::NORMAL;
|
||||
$ignoreCancelled = false;
|
||||
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
|
||||
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})/m", (string) $method->getDocComment(), $matches) > 0){
|
||||
$matches[1] = strtoupper($matches[1]);
|
||||
if(defined(EventPriority::class . "::" . $matches[1])){
|
||||
$priority = constant(EventPriority::class . "::" . $matches[1]);
|
||||
}
|
||||
}
|
||||
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
|
||||
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})/m", (string) $method->getDocComment(), $matches) > 0){
|
||||
$matches[1] = strtolower($matches[1]);
|
||||
if($matches[1] === "false"){
|
||||
$ignoreCancelled = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user