Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-21 05:50:05 +01:00
a207d14a0e
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
25 Zeilen
1008 B
Diff
25 Zeilen
1008 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();
|