|
@@ -31,7 +31,6 @@ import org.bukkit.event.entity.ExplosionPrimeEvent;
|
|
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
|
|
import org.bukkit.event.entity.PotionSplashEvent;
|
|
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
|
|
-import org.bukkit.inventory.ItemStack;
|
|
|
import org.bukkit.inventory.meta.PotionMeta;
|
|
|
import org.bukkit.metadata.FixedMetadataValue;
|
|
|
import org.bukkit.potion.PotionEffect;
|
|
@@ -73,14 +72,12 @@ public class EntityListener implements Listener {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- ItemStack bow = event.getBow();
|
|
|
-
|
|
|
- if (bow != null && bow.containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
|
|
+ if (event.getBow().containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
|
|
projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
|
|
|
}
|
|
|
|
|
|
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, Math.min(event.getForce() * AdvancedConfig.getInstance().getForceMultiplier(), 1.0)));
|
|
|
- projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, Archery.locationToString(projectile.getLocation())));
|
|
|
+ projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, projectile.getLocation()));
|
|
|
}
|
|
|
|
|
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
|
@@ -92,7 +89,7 @@ public class EntityListener implements Listener {
|
|
|
}
|
|
|
|
|
|
projectile.setMetadata(mcMMO.bowForceKey, new FixedMetadataValue(plugin, 1.0));
|
|
|
- projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, Archery.locationToString(projectile.getLocation())));
|
|
|
+ projectile.setMetadata(mcMMO.arrowDistanceKey, new FixedMetadataValue(plugin, projectile.getLocation()));
|
|
|
}
|
|
|
|
|
|
/**
|