testserver/Spigot-Server-Patches/0057-Add-methods-for-workin...

28 lines
1.1 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index e021e731b01ca78b086812fcf6f2ae8533df7e87..ddcd44bb181559858677bd127e875d830c10ec95 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -678,4 +678,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Spigot.");
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
2017-05-14 18:05:01 +00:00
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
2017-05-14 18:05:01 +00:00
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}