diff --git a/.travis.yml b/.travis.yml index 3493d0305..940fe9a3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_script: - echo | pecl install channel://pecl.php.net/yaml-2.0.2 - git clone https://github.com/krakjoe/pthreads.git - cd pthreads - - git checkout caca8dc42a5d75ddfb39e6fd15337e87e967517e #master is broken - https://github.com/krakjoe/pthreads/issues/757 + - git checkout 6c6b15138c923b69cfa46ee05fc2dd45da587287 - phpize - ./configure - make diff --git a/src/pocketmine/command/SimpleCommandMap.php b/src/pocketmine/command/SimpleCommandMap.php index 1587344a1..b8e2e288a 100644 --- a/src/pocketmine/command/SimpleCommandMap.php +++ b/src/pocketmine/command/SimpleCommandMap.php @@ -85,48 +85,52 @@ class SimpleCommandMap implements CommandMap{ } private function setDefaultCommands(){ - $this->register("pocketmine", new VersionCommand("version")); - $this->register("pocketmine", new PluginsCommand("plugins")); - $this->register("pocketmine", new SeedCommand("seed")); - $this->register("pocketmine", new HelpCommand("help")); - $this->register("pocketmine", new StopCommand("stop")); - $this->register("pocketmine", new TellCommand("tell")); - $this->register("pocketmine", new DefaultGamemodeCommand("defaultgamemode")); - $this->register("pocketmine", new BanCommand("ban")); - $this->register("pocketmine", new BanIpCommand("ban-ip")); - $this->register("pocketmine", new BanListCommand("banlist")); - $this->register("pocketmine", new PardonCommand("pardon")); - $this->register("pocketmine", new PardonIpCommand("pardon-ip")); - $this->register("pocketmine", new SayCommand("say")); - $this->register("pocketmine", new MeCommand("me")); - $this->register("pocketmine", new ListCommand("list")); - $this->register("pocketmine", new DifficultyCommand("difficulty")); - $this->register("pocketmine", new KickCommand("kick")); - $this->register("pocketmine", new OpCommand("op")); - $this->register("pocketmine", new DeopCommand("deop")); - $this->register("pocketmine", new WhitelistCommand("whitelist")); - $this->register("pocketmine", new SaveOnCommand("save-on")); - $this->register("pocketmine", new SaveOffCommand("save-off")); - $this->register("pocketmine", new SaveCommand("save-all")); - $this->register("pocketmine", new GiveCommand("give")); - $this->register("pocketmine", new EffectCommand("effect")); - $this->register("pocketmine", new EnchantCommand("enchant")); - $this->register("pocketmine", new ParticleCommand("particle")); - $this->register("pocketmine", new GamemodeCommand("gamemode")); - $this->register("pocketmine", new KillCommand("kill")); - $this->register("pocketmine", new SpawnpointCommand("spawnpoint")); - $this->register("pocketmine", new SetWorldSpawnCommand("setworldspawn")); - $this->register("pocketmine", new TeleportCommand("tp")); - $this->register("pocketmine", new TimeCommand("time")); - $this->register("pocketmine", new TimingsCommand("timings")); - $this->register("pocketmine", new TitleCommand("title")); - $this->register("pocketmine", new ReloadCommand("reload")); - $this->register("pocketmine", new TransferServerCommand("transferserver")); + $this->registerAll("pocketmine", [ + new BanCommand("ban"), + new BanIpCommand("ban-ip"), + new BanListCommand("banlist"), + new DefaultGamemodeCommand("defaultgamemode"), + new DeopCommand("deop"), + new DifficultyCommand("difficulty"), + new EffectCommand("effect"), + new EnchantCommand("enchant"), + new GamemodeCommand("gamemode"), + new GiveCommand("give"), + new HelpCommand("help"), + new KickCommand("kick"), + new KillCommand("kill"), + new ListCommand("list"), + new MeCommand("me"), + new OpCommand("op"), + new PardonCommand("pardon"), + new PardonIpCommand("pardon-ip"), + new ParticleCommand("particle"), + new PluginsCommand("plugins"), + new ReloadCommand("reload"), + new SaveCommand("save-all"), + new SaveOffCommand("save-off"), + new SaveOnCommand("save-on"), + new SayCommand("say"), + new SeedCommand("seed"), + new SetWorldSpawnCommand("setworldspawn"), + new SpawnpointCommand("spawnpoint"), + new StopCommand("stop"), + new TeleportCommand("tp"), + new TellCommand("tell"), + new TimeCommand("time"), + new TimingsCommand("timings"), + new TitleCommand("title"), + new TransferServerCommand("transferserver"), + new VersionCommand("version"), + new WhitelistCommand("whitelist") + ]); if($this->server->getProperty("debug.commands", false)){ - $this->register("pocketmine", new StatusCommand("status")); - $this->register("pocketmine", new GarbageCollectorCommand("gc")); - $this->register("pocketmine", new DumpMemoryCommand("dumpmemory")); + $this->registerAll("pocketmine", [ + new StatusCommand("status"), + new GarbageCollectorCommand("gc"), + new DumpMemoryCommand("dumpmemory") + ]); } } diff --git a/src/pocketmine/entity/FallingSand.php b/src/pocketmine/entity/FallingSand.php index 080cccc2f..56f05d7e7 100644 --- a/src/pocketmine/entity/FallingSand.php +++ b/src/pocketmine/entity/FallingSand.php @@ -26,7 +26,6 @@ namespace pocketmine\entity; use pocketmine\block\BlockFactory; use pocketmine\event\entity\EntityBlockChangeEvent; use pocketmine\event\entity\EntityDamageEvent; -use pocketmine\item\Item as ItemItem; use pocketmine\item\ItemFactory; use pocketmine\math\Vector3; use pocketmine\nbt\tag\ByteTag; diff --git a/src/pocketmine/event/server/NetworkInterfaceRegisterEvent.php b/src/pocketmine/event/server/NetworkInterfaceRegisterEvent.php index d127f8bba..e1e736920 100644 --- a/src/pocketmine/event/server/NetworkInterfaceRegisterEvent.php +++ b/src/pocketmine/event/server/NetworkInterfaceRegisterEvent.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace pocketmine\event\server; use pocketmine\event\Cancellable; -use pocketmine\network\SourceInterface; /** * Called when a network interface is registered into the network, for example the RakLib interface. diff --git a/src/pocketmine/plugin/PluginDescription.php b/src/pocketmine/plugin/PluginDescription.php index 9f63b2156..4cf9b99fb 100644 --- a/src/pocketmine/plugin/PluginDescription.php +++ b/src/pocketmine/plugin/PluginDescription.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace pocketmine\plugin; -use pocketmine\network\mcpe\protocol\ProtocolInfo; use pocketmine\permission\Permission; class PluginDescription{