Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Fix punch
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAz928 authored Oct 17, 2017
1 parent 25500ae commit ffe0765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VanillaEnchants/handlers/Punch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
}

0 comments on commit ffe0765

Please sign in to comment.