Resolving some compatibility !

Esse commit está contido em:
Ad5001 2016-06-10 19:09:16 +02:00
commit 8164e0af6a
2 arquivos alterados com 4 adições e 4 exclusões

BIN
UHC.png Normal file

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 14 KiB

Ver arquivo

@ -163,14 +163,14 @@ switch($cmd->getName()){
}
}
break;
case "scenarios" {
case "scenarios":
if(isset($args[2])) {
if(isset($this->worlds[$sender->getLevel()->getName()]) and !isset($this->games[$sender->getLevel()->getName()])) {
if(file_exists($this->getDataFolder() . "scenarios/" . $args[2] . ".php")) { // yes, I'm treating args[2] before args[1] but who cares x) ?
switch($args[1]) {
case "add":
$sl = new \pocketmine\plugin\ScriptPluginLoader($this->getServer());
$scenarios[$args[2]] = $sl->load(realpath($this->getDataFolder() . "scenarios/" . $args[2] . ".php"));
require_once(realpath($this->getDataFolder() . "scenarios/" . $args[2] . ".php"));
$scenarios[$args[2]] = new $args[2]();
$scenarios[$args[2]]->onEnable();
break;
case "remove":
@ -181,7 +181,7 @@ switch($cmd->getName()){
}
}
}
}
break;
}
return false;
}