mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Check the projectile type instead of main hand item
This commit is contained in:
parent
517ca6568f
commit
9092e70544
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user