From ffe07651829ac9943e190c54bf0f4396f6f4fb53 Mon Sep 17 00:00:00 2001 From: Az928 Date: Tue, 17 Oct 2017 14:45:52 +0600 Subject: [PATCH] Fix punch --- src/VanillaEnchants/handlers/Punch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VanillaEnchants/handlers/Punch.php b/src/VanillaEnchants/handlers/Punch.php index c07baaa..3edd71c 100644 --- a/src/VanillaEnchants/handlers/Punch.php +++ b/src/VanillaEnchants/handlers/Punch.php @@ -21,10 +21,10 @@ public function onDamage(EntityDamageEvent $event){ return false; } $item = $damager->getInventory()->getItemInHand(); - if($item->hasEnchantment(20) && $item->isBow()){ + if($item->hasEnchantment(20) && $item->getId() == 261){ $add = $item->getEnchantment(20)->getLevel() * 0.45; $event->setKnockback($event->getKnockback() + $add); } } } -} \ No newline at end of file +}