From e8f711959a5d881de6e463dcf39f49923137b015 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 26 Dec 2018 08:00:00 +1100 Subject: [PATCH] Add API to get / set base arrow damage By: md_5 --- .../src/main/java/org/bukkit/entity/Arrow.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Arrow.java b/paper-api/src/main/java/org/bukkit/entity/Arrow.java index 752eeb5e92..bf0d362d5e 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Arrow.java +++ b/paper-api/src/main/java/org/bukkit/entity/Arrow.java @@ -23,6 +23,24 @@ public interface Arrow extends Projectile { */ public void setKnockbackStrength(int knockbackStrength); + /** + * Gets the base amount of damage this arrow will do. + * + * Defaults to 2.0 for a normal arrow with + * 0.5 * (1 + power level) added for arrows fired from + * enchanted bows. + * + * @return base damage amount + */ + public double getDamage(); + + /** + * Sets the base amount of damage this arrow will do. + * + * @param damage new damage amount + */ + public void setDamage(double damage); + /** * Gets whether this arrow is critical. *