Check the projectile type instead of main hand item

This commit is contained in:
nossr50 2019-06-25 22:44:14 -07:00
parent 517ca6568f
commit 9092e70544

View File

@ -139,11 +139,7 @@ public class EntityListener implements Listener {
Projectile projectile = event.getEntity();
//Hacky stuff for 1.13/1.14 compat
String itemKey = player.getInventory().getItemInMainHand().getType().getKey().toString();
if(!itemKey.equalsIgnoreCase("minecraft:bow") && !itemKey.equalsIgnoreCase("minecraft:crossbow"))
if(!(projectile instanceof Arrow))
return;
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));