فهرست منبع

Check the projectile type instead of main hand item

nossr50 6 سال پیش
والد
کامیت
9092e70544
1فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 5
      src/main/java/com/gmail/nossr50/listeners/EntityListener.java

+ 1 - 5
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));