mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
a207d14a0e
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
24 lines
1,008 B
Diff
24 lines
1,008 B
Diff
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
|
|
index eb136af0f99f5d7520ceabb98cefd5a01122872c..170bb1124ee396a85dd64baed8110e39823ad849 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
@@ -773,6 +773,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
return getHandle().useItem.asBukkitMirror();
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public void clearActiveItem() {
|
|
+ getHandle().stopUsingItem();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public int getItemUseRemainingTime() {
|
|
return getHandle().getItemUseRemainingTime();
|