From 1ca90a8f25ba2d370fc108cc0c2b4ea30b0c151c Mon Sep 17 00:00:00 2001 From: Az928 Date: Tue, 17 Oct 2017 14:22:06 +0600 Subject: [PATCH] Fix power enchant --- src/VanillaEnchants/handlers/Power.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VanillaEnchants/handlers/Power.php b/src/VanillaEnchants/handlers/Power.php index a335f4b..1729bc3 100644 --- a/src/VanillaEnchants/handlers/Power.php +++ b/src/VanillaEnchants/handlers/Power.php @@ -21,10 +21,10 @@ public function onDamage(EntityDamageEvent $event){ return false; } $item = $damager->getInventory()->getItemInHand(); - if($item->hasEnchantment(19) && $item->isBow()){ + if($item->hasEnchantment(19) && $item->getId() == 261){ $add = $item->getEnchantment(19)->getLevel() * 0.5 + 3; - $event->setFinalDamage($event->getFinalDamage() + $add); + $event->setFinalDamage($event->getFinalDamage() + $add); } } } -} \ No newline at end of file +}