mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 06:55:29 +00:00
Fixed @notscript without trailing spaces not detected
This commit is contained in:
parent
2fb3b41b8d
commit
73f24786cd
@ -94,9 +94,9 @@ class ScriptPluginLoader implements PluginLoader{
|
|||||||
$insideHeader = true;
|
$insideHeader = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match("/^[ \t]+\\*[ \t]+@([a-zA-Z]+)[ \t]+(.*)$/", $line, $matches) > 0){
|
if(preg_match("/^[ \t]+\\*[ \t]+@([a-zA-Z]+)([ \t]+(.*))?$/", $line, $matches) > 0){
|
||||||
$key = $matches[1];
|
$key = $matches[1];
|
||||||
$content = trim($matches[2]);
|
$content = trim($matches[3]);
|
||||||
|
|
||||||
if($key === "notscript"){
|
if($key === "notscript"){
|
||||||
return null;
|
return null;
|
||||||
@ -161,4 +161,4 @@ class ScriptPluginLoader implements PluginLoader{
|
|||||||
$plugin->setEnabled(false);
|
$plugin->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user