diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index e4accebc4..230ef23b4 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1576,6 +1576,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ if($this->isSurvival()){ $this->inventory->removeItem(Item::get(Item::ARROW, 0, 1)); $bow->setDamage($bow->getDamage() + 1); + $this->inventory->setItemInHand($bow); if($bow->getDamage() >= 385){ $this->inventory->setItemInHand(Item::get(Item::AIR, 0, 0)); } diff --git a/src/pocketmine/entity/Arrow.php b/src/pocketmine/entity/Arrow.php index bc9c2da92..bdfe1c76f 100644 --- a/src/pocketmine/entity/Arrow.php +++ b/src/pocketmine/entity/Arrow.php @@ -84,7 +84,6 @@ class Arrow extends Projectile{ $nearDistance = PHP_INT_MAX; $nearEntity = null; - foreach($list as $entity){ if(!$entity->canCollideWith($this) or ($entity === $this->shootingEntity and $this->ticksLived < 5)){ continue; diff --git a/src/pocketmine/item/Bow.php b/src/pocketmine/item/Bow.php index 60cfbf8de..31993c4ef 100644 --- a/src/pocketmine/item/Bow.php +++ b/src/pocketmine/item/Bow.php @@ -24,7 +24,7 @@ namespace pocketmine\item; class Bow extends Tool{ public function __construct($meta = 0, $count = 1){ - parent::__construct(self::BOW, 0, $count, "Bow"); + parent::__construct(self::BOW, $meta, $count, "Bow"); } } \ No newline at end of file