From 73f24786cda1bc794d633f06cdd496b10ed300cf Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Mon, 28 Mar 2016 01:26:15 +0800 Subject: [PATCH] Fixed @notscript without trailing spaces not detected --- src/pocketmine/plugin/ScriptPluginLoader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/plugin/ScriptPluginLoader.php b/src/pocketmine/plugin/ScriptPluginLoader.php index 196125503..2ef1c746b 100644 --- a/src/pocketmine/plugin/ScriptPluginLoader.php +++ b/src/pocketmine/plugin/ScriptPluginLoader.php @@ -94,9 +94,9 @@ 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; @@ -161,4 +161,4 @@ class ScriptPluginLoader implements PluginLoader{ $plugin->setEnabled(false); } } -} \ No newline at end of file +}