-
-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More itemstack api stuffs for plugins
- Loading branch information
1 parent
cae1e7e
commit 3e61186
Showing
3 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: William Blake Galbreath <Blake.Galbreath@GMail.com> | ||
Date: Mon, 17 Aug 2020 21:50:32 -0500 | ||
Subject: [PATCH] LivingEntity#broadcastItemBreak | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java | ||
index a0db76946..7b1cb6623 100644 | ||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java | ||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java | ||
@@ -785,5 +785,12 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource | ||
* @param quantity Quantity of item | ||
*/ | ||
void playPickupItemAnimation(@NotNull Item item, int quantity); | ||
+ | ||
+ /** | ||
+ * Play item break animation for the item in specified equipment slot | ||
+ * | ||
+ * @param slot Equipment slot to play break animation for | ||
+ */ | ||
+ void broadcastItemBreak(@NotNull org.bukkit.inventory.EquipmentSlot slot); | ||
// Purpur end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: William Blake Galbreath <Blake.Galbreath@GMail.com> | ||
Date: Mon, 17 Aug 2020 21:50:39 -0500 | ||
Subject: [PATCH] LivingEntity#broadcastItemBreak | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | ||
index a415707e9a..c97a152f79 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | ||
@@ -768,5 +768,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { | ||
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { | ||
getHandle().receive(((CraftItem)item).getHandle(), quantity); | ||
} | ||
+ | ||
+ @Override | ||
+ public void broadcastItemBreak(org.bukkit.inventory.EquipmentSlot slot) { | ||
+ if (slot == null) return; | ||
+ getHandle().broadcastItemBreak(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); | ||
+ } | ||
// Purpur end | ||
} |