2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Anrza <andrzejrzeczycki314@gmail.com>
|
|
|
|
Date: Wed, 15 Jul 2020 12:08:49 +0200
|
|
|
|
Subject: [PATCH] Add LivingEntity#clearActiveItem
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2024-06-13 22:57:13 +02:00
|
|
|
index 7c5f873ed2962244d8a17583b26c29b7caffe5d4..671fb1d1bffd7cdffcb56193e0b4f08a0eda0682 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2024-06-13 22:57:13 +02:00
|
|
|
@@ -936,6 +936,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2024-04-06 21:53:39 +02:00
|
|
|
return this.getHandle().getUseItem().asBukkitMirror();
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public void clearActiveItem() {
|
|
|
|
+ getHandle().stopUsingItem();
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
@Override
|
2024-04-06 21:53:39 +02:00
|
|
|
public int getActiveItemRemainingTime() {
|
|
|
|
return this.getHandle().getUseItemRemainingTicks();
|