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"){