diff --git a/PocketMine-MP.php b/PocketMine-MP.php index 28a97e93a..b2521b2a6 100644 --- a/PocketMine-MP.php +++ b/PocketMine-MP.php @@ -19,10 +19,9 @@ * */ + /***REM_START***/ require_once(dirname(__FILE__)."/src/config.php"); - -//Language Support require_once(FILE_PATH . "/src/language/en_us.php"); require_once(FILE_PATH."/src/functions.php"); @@ -33,4 +32,4 @@ $server = new ServerAPI(); $server->start(); kill(getmypid()); //Fix for ConsoleAPI being blocked -exit(0); \ No newline at end of file +exit(0); diff --git a/src/API/BanAPI.php b/src/API/BanAPI.php index 290c54833..88874fafb 100644 --- a/src/API/BanAPI.php +++ b/src/API/BanAPI.php @@ -35,13 +35,13 @@ class BanAPI{ $this->bannedIPs = new Config(DATA_PATH."banned-ips.txt", CONFIG_LIST);//Open Banned IPs list file $this->banned = new Config(DATA_PATH."banned.txt", CONFIG_LIST);//Open Banned Usernames list file $this->ops = new Config(DATA_PATH."ops.txt", CONFIG_LIST);//Open list of OPs - $this->server->api->console->register("banip", CMD_BANIP_DESC, array($this, "commandHandler")); - $this->server->api->console->register("ban", CMD_BAN_DESC, array($this, "commandHandler")); - $this->server->api->console->register("kick", CMD_KICK_DESC, array($this, "commandHandler")); - $this->server->api->console->register("whitelist", CMD_WHITELIST_DESC, array($this, "commandHandler")); - $this->server->api->console->register("op", CMD_OP_DESC, array($this, "commandHandler")); - $this->server->api->console->register("deop", CMD_DEOP_DESC, array($this, "commandHandler")); - $this->server->api->console->register("sudo", CMD_SUDO_DESC, array($this, "commandHandler")); + $this->server->api->console->register("banip", " [IP|player]", array($this, "commandHandler")); + $this->server->api->console->register("ban", " [username]", array($this, "commandHandler")); + $this->server->api->console->register("kick", " [reason ...]", array($this, "commandHandler")); + $this->server->api->console->register("whitelist", " [username]", array($this, "commandHandler")); + $this->server->api->console->register("op", "", array($this, "commandHandler")); + $this->server->api->console->register("deop", "", array($this, "commandHandler")); + $this->server->api->console->register("sudo", "", array($this, "commandHandler")); $this->server->api->console->alias("ban-ip", "banip add"); $this->server->api->console->alias("banlist", "ban list"); $this->server->api->console->alias("pardon", "ban remove"); @@ -108,11 +108,11 @@ class BanAPI{ $target = strtolower(array_shift($params)); $player = $this->server->api->player->get($target); if(!($player instanceof Player)){ - $output .= API_BAN_PLAYER_NOT_CONNECTED . "\n"; + $output .= "Player not connected.\n"; break; } $this->server->api->console->run(implode(" ", $params), $player); - $output .= str_replace( "{player}", $player->username, API_BAN_CMD_RUN_AS ) . ".\n"; + $output .= "Command ran as ".$player->username.".\n"; break; case "op": $user = strtolower($params[0]); @@ -120,13 +120,13 @@ class BanAPI{ if(!($player instanceof Player)){ $this->ops->set($user); $this->ops->save($user); - $output .= str_replace( "{player}", $user, API_BAN_NOW_OP) . "\n"; + $output .= $user." is now op\n"; break; } $this->ops->set($player->iusername); $this->ops->save(); - $output .= str_replace( "{player}", $player->iusername, API_BAN_NOW_OP) . "\n"; - $this->server->api->chat->sendTo(false, API_BAN_YOU_NOW_OP, $player->iusername); + $output .= $player->iusername." is now op\n"; + $this->server->api->chat->sendTo(false, "You are now op.", $player->iusername); break; case "deop": $user = strtolower($params[0]); diff --git a/src/language/en_us.php b/src/language/en_us.php deleted file mode 100644 index dbfe5ac66..000000000 --- a/src/language/en_us.php +++ /dev/null @@ -1,38 +0,0 @@ - [IP|player]"; -const CMD_BAN_DESC = " [username]"; -const CMD_KICK_DESC = " [reason ...]"; -const CMD_WHITELIST_DESC = " [username]"; -const CMD_OP_DESC = ""; -const CMD_DEOP_DESC = ""; -const CMD_SUDO_DESC = ""; - -//Ban API Language -const API_BAN_PLAYER_NOT_CONNECTED = "Player not connected."; -const API_BAN_CMD_RUN_AS = "Command ran as {player}"; -const API_BAN_NOW_OP = "{player} is now op"; -const API_BAN_YOU_NOW_OP = "you are now op."; -const API_BAN_NOW_DEOP = "{player} is no longer op"; - -?> \ No newline at end of file diff --git a/src/material/block/liquid/Lava.php b/src/material/block/liquid/Lava.php index 154f4bcbb..1dfbb7743 100644 --- a/src/material/block/liquid/Lava.php +++ b/src/material/block/liquid/Lava.php @@ -101,6 +101,7 @@ class LavaBlock extends LiquidBlock{ $down = $this->getSide(0); $from = $this->getFrom(); + //출처가 있거나 이 자체가 출처이면 if($from !== null || $level == 0x00) { if($level !== 0x07) @@ -130,17 +131,33 @@ class LavaBlock extends LiquidBlock{ } else { - //Extend Request for Left Lavas + //Extend Remove for Left Lavas for($side = 2; $side <= 5; ++$side) { $sb = $this->getSide($side); + if($sb instanceof LavaBlock) + { + $tlevel = $sb->meta & 0x07; + if($tlevel != 0x00) + { + $this->level->setBlock($sb, new AirBlock(), false, false, true); + } + } $b = $this->getSide(0)->getSide($side); - ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($sb, 0, 0, $this->level), 40, BLOCK_UPDATE_NORMAL); - ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 40, BLOCK_UPDATE_NORMAL); + if($b instanceof LavaBlock) + { + $tlevel = $b->meta & 0x07; + if($tlevel != 0x00) + { + $this->level->setBlock($b, new AirBlock(), false, false, true); + } + } + //ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); } + //출처가 제거된 경우 이 블록 제거 $this->level->setBlock($this, new AirBlock(), false, false, true); } return false; } -} \ No newline at end of file +} diff --git a/src/material/block/liquid/Water.php b/src/material/block/liquid/Water.php index 8aa36470c..666e85156 100644 --- a/src/material/block/liquid/Water.php +++ b/src/material/block/liquid/Water.php @@ -141,12 +141,27 @@ class WaterBlock extends LiquidBlock{ for($side = 2; $side <= 5; ++$side) { $sb = $this->getSide($side); + if($sb instanceof WaterBlock) + { + $tlevel = $sb->meta & 0x07; + if($tlevel != 0x00) + { + $this->level->setBlock($sb, new AirBlock(), false, false, true); + } + } $b = $this->getSide(0)->getSide($side); - ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($sb, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); - ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); + if($b instanceof WaterBlock) + { + $tlevel = $b->meta & 0x07; + if($tlevel != 0x00) + { + $this->level->setBlock($b, new AirBlock(), false, false, true); + } + } + //ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); } $this->level->setBlock($this, new AirBlock(), false, false, true); } return false; } -} \ No newline at end of file +} diff --git a/src/pmf/Level.php b/src/pmf/Level.php index 56f035fcc..49a18bab4 100644 --- a/src/pmf/Level.php +++ b/src/pmf/Level.php @@ -475,7 +475,8 @@ class PMFLevel extends PMF{ for($side = 0; $side <= 5; ++$side) { $b = $pos->getSide($side); - ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); + if($b instanceof LavaBlock) { ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 40, BLOCK_UPDATE_NORMAL); } + else { ServerAPI::request()->api->block->scheduleBlockUpdate(new Position($b, 0, 0, $this->level), 10, BLOCK_UPDATE_NORMAL); } } } return true; @@ -519,4 +520,4 @@ class PMFLevel extends PMF{ } } -} \ No newline at end of file +}