mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06: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();
|
Projectile projectile = event.getEntity();
|
||||||
|
|
||||||
//Hacky stuff for 1.13/1.14 compat
|
if(!(projectile instanceof Arrow))
|
||||||
|
|
||||||
String itemKey = player.getInventory().getItemInMainHand().getType().getKey().toString();
|
|
||||||
|
|
||||||
if(!itemKey.equalsIgnoreCase("minecraft:bow") && !itemKey.equalsIgnoreCase("minecraft:crossbow"))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));
|
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));
|
||||||
|
Loading…
Reference in New Issue
Block a user