aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0067-Add-methods-for-working-with-arrows-stuck-in-living-.patch
blob: 37ede5cbc9a16e27c0d291c24214affe2cf1f5a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 13906f0dfd7169b2110c83b7cb51c4979668cb13..652f0e3429efba1326f0e4cae7096a6cfe4b2c85 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -722,4 +722,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
         this.getHandle().persistentInvisibility = invisible;
         this.getHandle().setSharedFlag(5, invisible);
     }
+
+    // Paper start
+    @Override
+    public int getArrowsStuck() {
+        return getHandle().getArrowCount();
+    }
+
+    @Override
+    public void setArrowsStuck(int arrows) {
+        getHandle().setArrowCount(arrows);
+    }
+    // Paper end
 }