Paper/CraftBukkit-Patches/0037-Implement-Arrow-API.patch

32 lines
948 B
Diff

From 16435527875119524c17d1c28dc3b6159e68e619 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:16:05 +1000
Subject: [PATCH] Implement Arrow API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index a386001..e976b83 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -44,6 +44,17 @@ public class CraftArrow extends AbstractProjectile implements Arrow {
// Spigot start
private final Arrow.Spigot spigot = new Arrow.Spigot()
{
+ @Override
+ public double getDamage()
+ {
+ return getHandle().c();
+ }
+
+ @Override
+ public void setDamage(double damage)
+ {
+ getHandle().b( damage );
+ }
};
public Arrow.Spigot spigot()
--
1.8.1.2