diff --git a/src/pocketmine/command/SimpleCommandMap.php b/src/pocketmine/command/SimpleCommandMap.php index 205962966..c516b156d 100644 --- a/src/pocketmine/command/SimpleCommandMap.php +++ b/src/pocketmine/command/SimpleCommandMap.php @@ -102,7 +102,6 @@ class SimpleCommandMap implements CommandMap{ $this->register("pocketmine", new SetWorldSpawnCommand("setworldspawn")); $this->register("pocketmine", new TeleportCommand("tp")); $this->register("pocketmine", new ReloadCommand("reload")); - $this->register("pocketmine", new TimeCommand("time")); if($this->server->getConfigBoolean("debug.commands", false) === true){ $this->register("pocketmine", new StatusCommand("status")); diff --git a/src/pocketmine/command/defaults/GiveCommand.php b/src/pocketmine/command/defaults/GiveCommand.php index bd9003b14..9cc6b53e8 100644 --- a/src/pocketmine/command/defaults/GiveCommand.php +++ b/src/pocketmine/command/defaults/GiveCommand.php @@ -70,7 +70,9 @@ class GiveCommand extends VanillaCommand{ return true; } - $player->addItem(clone $item); + + //TODO: overflow + $player->getInventory()->addItem(clone $item); }else{ $sender->sendMessage(TextFormat::RED . "Can't find player " . $args[0]); diff --git a/src/pocketmine/command/defaults/StatusCommand.php b/src/pocketmine/command/defaults/StatusCommand.php index 3f0ede59d..1ded0d8a6 100644 --- a/src/pocketmine/command/defaults/StatusCommand.php +++ b/src/pocketmine/command/defaults/StatusCommand.php @@ -31,9 +31,9 @@ class StatusCommand extends VanillaCommand{ parent::__construct( $name, "Reads back the server's performance.", - "/list" + "/status" ); - $this->setPermission("pocketmine.command.list"); + $this->setPermission("pocketmine.command.status"); } public function execute(CommandSender $sender, $currentAlias, array $args){ diff --git a/src/pocketmine/command/defaults/TimeCommand.php b/src/pocketmine/command/defaults/TimeCommand.php deleted file mode 100644 index 65d13aa0d..000000000 --- a/src/pocketmine/command/defaults/TimeCommand.php +++ /dev/null @@ -1,69 +0,0 @@ -\n/time add " - ); - $this->setPermission("pocketmine.command.time.add;pocketmine.command.set;"); - } - - public function execute(CommandSender $sender, $label, array $args){ - if(count($args) < 2){ - $sender->sendMessage(TextFormat::RED . "Incorrect usage. Correct usage:\n" . $this->getUsage()); - - return false; - } - - switch(strtolower($args[0])){ - case "set": - if(!$sender->hasPermission("pocketmine.command.time.add")){ - $sender->sendMessage(TextFormat::RED . "You don't have permission to set the time"); - - return true; - } - - if($args[1] === "day"){ - $value = 0; - }elseif($args[1] === "night"){ - $value = 12500; - }else{ - $value = $this->getInteger($sender, $args[1], 0); - } - - foreach(Server::getInstance()->getLevels() as $level){ - $level->setTime($value); - } - Command::broadcastCommandMessage($sender, "Set time to " . $value); - - return true; - case "add": - if(!$sender->hasPermission("pocketmine.command.time.add")){ - $sender->sendMessage(TextFormat::RED . "You don't have permission to set the time"); - - return true; - } - - $value = $this->getInteger($sender, $args[1], 0); - - foreach(Server::getInstance()->getLevels() as $level){ - $level->setTime($level->getTime() + $value); - } - - Command::broadcastCommandMessage($sender, "Added " . $value . " to time"); - - return true; - default: - $sender->sendMessage("Unknown method. Usage: " . $this->getUsage()); - } - } -} \ No newline at end of file diff --git a/start.cmd b/start.cmd index 68547354e..1b39a5e6c 100644 --- a/start.cmd +++ b/start.cmd @@ -19,12 +19,12 @@ if exist PocketMine-MP.phar ( ) ) -if exist bin\php\php_wxwidgets.dll ( - %PHP_BINARY% %POCKETMINE_FILE% --enable-gui %* -) else ( +#if exist bin\php\php_wxwidgets.dll ( +# %PHP_BINARY% %POCKETMINE_FILE% --enable-gui %* +#) else ( if exist bin\mintty.exe ( start "" bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font="DejaVu Sans Mono" -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t "PocketMine-MP" -i bin/pocketmine.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %* ) else ( %PHP_BINARY% %POCKETMINE_FILE% %* ) -) +#)