From 9092e705445db25c7efa0f97684d11902d855143 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 25 Jun 2019 22:44:14 -0700 Subject: [PATCH] Check the projectile type instead of main hand item --- .../java/com/gmail/nossr50/listeners/EntityListener.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 2e2376584..69ca40c52 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -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));