diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index b46b9c4c..bea6067c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityArrow; +import org.apache.commons.lang.Validate; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; @@ -27,6 +28,15 @@ public class CraftArrow extends AbstractProjectile implements Arrow { } } + public void setKnockbackStrength(int knockbackStrength) { + Validate.isTrue(knockbackStrength >= 0, "Knockback cannot be negative"); + getHandle().a(knockbackStrength); + } + + public int getKnockbackStrength() { + return getHandle().aw; + } + @Override public EntityArrow getHandle() { return (EntityArrow) entity; |