Formatting

This commit is contained in:
Shoghi Cervantes
2014-04-01 19:48:28 +02:00
parent b4cc3bbd43
commit 7e9304a0c9
20 changed files with 23 additions and 27 deletions

View File

@@ -51,7 +51,7 @@ class FolderPluginLoader implements PluginLoader{
if(is_dir($file) and file_exists($file . "/plugin.yml") and file_exists($file . "/src/")){
if(($description = $this->getPluginDescription($file)) instanceof PluginDescription){
console("[INFO] Loading " . $description->getFullName());
console("[WARNING] Non-packaged plugin ".$description->getName() ." detected, do not use on production.");
console("[WARNING] Non-packaged plugin " . $description->getName() . " detected, do not use on production.");
$dataFolder = dirname($file) . DIRECTORY_SEPARATOR . $description->getName();
if(file_exists($dataFolder) and !is_dir($dataFolder)){
trigger_error("Projected dataFolder '" . $dataFolder . "' for " . $description->getName() . " exists and is not a directory", E_USER_WARNING);

View File

@@ -73,6 +73,7 @@ class PharPluginLoader implements PluginLoader{
return null;
}
}
return null;
}

View File

@@ -555,6 +555,7 @@ class PluginManager{
$pluginCmds[] = $newCmd;
}
}
return $pluginCmds;
}
@@ -616,7 +617,8 @@ class PluginManager{
*/
public function registerEvents(Listener $listener, Plugin $plugin){
if(!$plugin->isEnabled()){
trigger_error("Plugin attempted to register ".get_class($listener)." while not enabled", E_USER_WARNING);
trigger_error("Plugin attempted to register " . get_class($listener) . " while not enabled", E_USER_WARNING);
return;
}
@@ -627,8 +629,8 @@ class PluginManager{
$ignoreCancelled = false;
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
$matches[1] = strtoupper($matches[1]);
if(defined("pocketmine\\event\\EventPriority::".$matches[1])){
$priority = constant("pocketmine\\event\\EventPriority::".$matches[1]);
if(defined("pocketmine\\event\\EventPriority::" . $matches[1])){
$priority = constant("pocketmine\\event\\EventPriority::" . $matches[1]);
}
}
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){