From 1f95e4ef1c79cba914b75031d2d97ebb3cccf632 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 26 Dec 2018 08:00:00 +1100 Subject: [PATCH] Add API to get / set base arrow damage By: md_5 --- .../org/bukkit/craftbukkit/entity/CraftArrow.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 516269eaa9..8aa1eebbfb 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -26,6 +26,17 @@ public class CraftArrow extends AbstractProjectile implements Arrow { return getHandle().knockbackStrength; } + @Override + public double getDamage() { + return getHandle().getDamage(); + } + + @Override + public void setDamage(double damage) { + Preconditions.checkArgument(damage >= 0, "Damage must be positive"); + getHandle().setDamage(damage); + } + public boolean isCritical() { return getHandle().isCritical(); }