diff --git a/src/pocketmine/plugin/ScriptPluginLoader.php b/src/pocketmine/plugin/ScriptPluginLoader.php index 95a2e2f973..2ef1c746ba 100644 --- a/src/pocketmine/plugin/ScriptPluginLoader.php +++ b/src/pocketmine/plugin/ScriptPluginLoader.php @@ -94,9 +94,13 @@ class ScriptPluginLoader implements PluginLoader{ $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]; - $content = trim($matches[2]); + $content = trim($matches[3]); + + if($key === "notscript"){ + return null; + } $data[$key] = $content; } @@ -157,4 +161,4 @@ class ScriptPluginLoader implements PluginLoader{ $plugin->setEnabled(false); } } -} \ No newline at end of file +}