Fixed PluginManager::parseYamlCommands()

This commit is contained in:
Shoghi Cervantes 2014-04-01 02:12:05 +02:00
parent 9cae532d7e
commit 3605bc36c5
2 changed files with 8 additions and 11 deletions

View File

@ -83,7 +83,7 @@ namespace PocketMine {
const MINECRAFT_VERSION = "v0.8.1 alpha"; const MINECRAFT_VERSION = "v0.8.1 alpha";
const PHP_VERSION = "5.5"; const PHP_VERSION = "5.5";
define("PocketMine\\PATH", \getcwd() . DIRECTORY_SEPARATOR); @define("PocketMine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
if(!class_exists("SplClassLoader", false)){ if(!class_exists("SplClassLoader", false)){
require_once(\PocketMine\PATH . "src/SPL/SplClassLoader.php"); require_once(\PocketMine\PATH . "src/SPL/SplClassLoader.php");
@ -142,8 +142,8 @@ namespace PocketMine {
$opts = getopt("", array("enable-ansi", "disable-ansi", "data:", "plugins:", "no-wizard")); $opts = getopt("", array("enable-ansi", "disable-ansi", "data:", "plugins:", "no-wizard"));
define("PocketMine\\DATA", isset($opts["data"]) ? realpath($opts["data"]) . DIRECTORY_SEPARATOR : \PocketMine\PATH); define("PocketMine\\DATA", isset($opts["data"]) ? realpath($opts["data"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
define("PocketMine\\PLUGIN_PATH", isset($opts["plugins"]) ? realpath($opts["plugins"]) . DIRECTORY_SEPARATOR : \PocketMine\PATH . "plugins/"); define("PocketMine\\PLUGIN_PATH", isset($opts["plugins"]) ? realpath($opts["plugins"]) . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
if((strpos(strtoupper(php_uname("s")), "WIN") === false or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"])){ if((strpos(strtoupper(php_uname("s")), "WIN") === false or isset($opts["enable-ansi"])) and !isset($opts["disable-ansi"])){
define("PocketMine\\ANSI", true); define("PocketMine\\ANSI", true);
@ -353,12 +353,10 @@ namespace PocketMine {
} }
if(!defined("PARENT_API_EXISTENT")){ $server = new Server($autoloader, \PocketMine\PATH, \PocketMine\DATA, \PocketMine\PLUGIN_PATH);
$server = new Server($autoloader, \PocketMine\PATH, \PocketMine\DATA, \PocketMine\PLUGIN_PATH); $server->start();
$server->start();
kill(getmypid()); kill(getmypid());
exit(0); exit(0);
}
} }

View File

@ -554,9 +554,8 @@ class PluginManager{
$pluginCmds[] = $newCmd; $pluginCmds[] = $newCmd;
} }
return $pluginCmds;
} }
return $pluginCmds;
} }
public function disablePlugins(){ public function disablePlugins(){