mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Formatting
This commit is contained in:
@@ -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);
|
||||
|
@@ -73,6 +73,7 @@ class PharPluginLoader implements PluginLoader{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@@ -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){
|
||||
|
Reference in New Issue
Block a user