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-10-23 17:13:43 +02:00
|
|
|
index db15382f35464de43a2fe0a41aca070a8c834777..de41ee2cc1be6ef412ec15c79a65cbca653b35d3 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-10-23 17:13:43 +02:00
|
|
|
@@ -967,6 +967,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();
|