From e1253db37cddc04479b5aa19ef55eef825f221a5 Mon Sep 17 00:00:00 2001 From: SOFe Date: Sat, 22 Oct 2016 15:01:23 +0800 Subject: [PATCH] Some more minor changes for autocompletion in IDEs --- src/pocketmine/Player.php | 4 ++-- src/pocketmine/command/defaults/BanListCommand.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index f27566478..3cfd62329 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2723,8 +2723,8 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade foreach($ingredients as $ingredient){ $slot = -1; - foreach($this->inventory->getContents() as $index => $i){ - if($ingredient->getId() !== 0 and $ingredient->deepEquals($i, $ingredient->getDamage() !== null) and ($i->getCount() - $used[$index]) >= 1){ + foreach($this->inventory->getContents() as $index => $item){ + if($ingredient->getId() !== 0 and $ingredient->deepEquals($item, $ingredient->getDamage() !== null) and ($item->getCount() - $used[$index]) >= 1){ $slot = $index; $used[$index]++; break; diff --git a/src/pocketmine/command/defaults/BanListCommand.php b/src/pocketmine/command/defaults/BanListCommand.php index d2ecbcf3f..f63c6e213 100644 --- a/src/pocketmine/command/defaults/BanListCommand.php +++ b/src/pocketmine/command/defaults/BanListCommand.php @@ -39,7 +39,7 @@ class BanListCommand extends VanillaCommand{ if(!$this->testPermission($sender)){ return true; } - $list = $sender->getServer()->getNameBans(); + if(isset($args[0])){ $args[0] = strtolower($args[0]); if($args[0] === "ips"){