Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ItemStack#effectiveName #11469

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions patches/api/0006-Adventure.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4361,10 +4361,10 @@ index 278259e211b926283ee6dfef6f96e11ddbcbf275..ebc14022c9ef9b0b3331ee53e96a3266

/**
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index aa7fcae0de70aa5c10a331dfb076efd2f2c64065..d5342258086066d3b9ef404916bad8440f0cf0cd 100644
index aa7fcae0de70aa5c10a331dfb076efd2f2c64065..9aa91975eccd1861d12ac43a8230a731c71c5a7d 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -200,4 +200,24 @@ public interface ItemFactory {
@@ -200,4 +200,15 @@ public interface ItemFactory {
*/
@NotNull
ItemStack enchantItem(@NotNull final ItemStack item, final int level, final boolean allowTreasures);
Expand All @@ -4378,19 +4378,10 @@ index aa7fcae0de70aa5c10a331dfb076efd2f2c64065..d5342258086066d3b9ef404916bad844
+ */
+ @NotNull
+ net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op);
+
+ /**
+ * Get the formatted display name of the {@link ItemStack}.
+ *
+ * @param itemStack the {@link ItemStack}
+ * @return display name of the {@link ItemStack}
+ */
+ @NotNull
+ net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
+ // Paper end - Adventure
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c675795d1e68d 100644
index eade62328895133c026e7e678e648e1fc846f5ee..a7874ed7507af57cf39c6a295fcd95253778ed14 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
Expand All @@ -4402,7 +4393,7 @@ index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c6757
private Material type = Material.AIR;
private int amount = 0;
private MaterialData data = null;
@@ -626,4 +626,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -626,4 +626,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
Expand All @@ -4413,15 +4404,6 @@ index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c6757
+ public net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op) {
+ return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op);
+ }
+
+ /**
+ * Get the formatted display name of the {@link ItemStack}.
+ *
+ * @return display name of the {@link ItemStack}
+ */
+ public net.kyori.adventure.text.@NotNull Component displayName() {
+ return Bukkit.getServer().getItemFactory().displayName(this);
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
Expand Down
14 changes: 7 additions & 7 deletions patches/api/0063-Add-getI18NDisplayName-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.

diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index d5342258086066d3b9ef404916bad8440f0cf0cd..333884bc8fe45c66d37a1bbcebc10ea655d2055f 100644
index 9aa91975eccd1861d12ac43a8230a731c71c5a7d..0d7ac6c333776ebcc19b113590fc13b012a6faab 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -220,4 +220,20 @@ public interface ItemFactory {
@@ -211,4 +211,20 @@ public interface ItemFactory {
@NotNull
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op);
// Paper end - Adventure
+
+ // Paper start - add getI18NDisplayName
Expand All @@ -33,12 +33,12 @@ index d5342258086066d3b9ef404916bad8440f0cf0cd..333884bc8fe45c66d37a1bbcebc10ea6
+ // Paper end - add getI18NDisplayName
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 730c42eddd38acec1cdbb19dfc8c675795d1e68d..da706fd72367b26b919ce08a5e118582020d4fbc 100644
index a7874ed7507af57cf39c6a295fcd95253778ed14..346e7d0e59902f244d2382819f7800a5e6c7b4dd 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -642,5 +642,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public net.kyori.adventure.text.@NotNull Component displayName() {
return Bukkit.getServer().getItemFactory().displayName(this);
@@ -633,5 +633,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op) {
return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op);
}
+
+ /**
Expand Down
10 changes: 5 additions & 5 deletions patches/api/0064-ensureServerConversions-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.

diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 333884bc8fe45c66d37a1bbcebc10ea655d2055f..c1ec8efffd5ff2a4dcb1d761be9a431a62284607 100644
index 0d7ac6c333776ebcc19b113590fc13b012a6faab..763a21276e20f3ac20255705caf8816a906bf1ab 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -236,4 +236,18 @@ public interface ItemFactory {
@@ -227,4 +227,18 @@ public interface ItemFactory {
@Deprecated(since = "1.18.1", forRemoval = true)
String getI18NDisplayName(@Nullable ItemStack item);
// Paper end - add getI18NDisplayName
Expand All @@ -30,7 +30,7 @@ index 333884bc8fe45c66d37a1bbcebc10ea655d2055f..c1ec8efffd5ff2a4dcb1d761be9a431a
+ // Paper end - ensure server conversions API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index da706fd72367b26b919ce08a5e118582020d4fbc..29bc12cb3095282a31f01f08ac66c15b24f42524 100644
index 346e7d0e59902f244d2382819f7800a5e6c7b4dd..c8e00c6e5008cc8393c268ad0cf62324adec6446 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -566,7 +566,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
Expand All @@ -42,8 +42,8 @@ index da706fd72367b26b919ce08a5e118582020d4fbc..29bc12cb3095282a31f01f08ac66c15b
}

/**
@@ -643,6 +643,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getServer().getItemFactory().displayName(this);
@@ -634,6 +634,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op);
}

+ /**
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0105-ItemStack-getMaxItemUseDuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item

diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 29bc12cb3095282a31f01f08ac66c15b24f42524..f908c11ece7b3d1a52e21540999f36796237d590 100644
index c8e00c6e5008cc8393c268ad0cf62324adec6446..1ff42a56d8b8cba6a2374725629a70c23a1c5701 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -670,5 +670,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -661,5 +661,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getI18NDisplayName() {
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore


diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f908c11ece7b3d1a52e21540999f36796237d590..d125d29759167996a90b7b69d92d944e80af22ab 100644
index 1ff42a56d8b8cba6a2374725629a70c23a1c5701..463e9550edbcc1bba1157c7b56c3f37e60f42207 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -686,5 +686,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -677,5 +677,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
// Requires access to NMS
return ensureServerConversions().getMaxItemUseDuration(entity);
}
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ index 8b5e4756d1c80e55be166dbe1faf57799f9cc03b..66d29e7f4187309d4a55202d1bda4b94
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e9c29fc1db686b80bc2477d78ec2b361b8600b9e..af09398e0864d338da530495bfd577db8adbe65a 100644
index ef8b2cedcaf7c0076d595e275bbfe2e858986c03..8df3a5c03330d7b678f704adcbd7573d858b23ed 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -661,6 +661,117 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -652,6 +652,117 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
}

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0202-Add-methods-to-get-translation-keys.patch
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
+
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index af09398e0864d338da530495bfd577db8adbe65a..60eec8a12f01562678732bcf38ac407e70d74965 100644
index 8df3a5c03330d7b678f704adcbd7573d858b23ed..e7e825f10172b54f136de54214b8d25b311ae778 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
Expand All @@ -536,7 +536,7 @@ index af09398e0864d338da530495bfd577db8adbe65a..60eec8a12f01562678732bcf38ac407e
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
@@ -982,5 +983,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -973,5 +974,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
ItemMeta itemMeta = getItemMeta();
return itemMeta != null && itemMeta.hasItemFlag(flag);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity


diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index a1d8ef8eda3c0256e8c82b7a01c3e7b11454b250..579a9037b656bef9fb65c6da03611e981492074a 100644
index d6f048fd1be9c171ad6cd9f26a7af9d4624c36f3..e244fb24975d4dfd91ca4d96e4c7ccb5f50e4a15 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -250,4 +250,65 @@ public interface ItemFactory {
@@ -241,4 +241,65 @@ public interface ItemFactory {
@NotNull
ItemStack ensureServerConversions(@NotNull ItemStack item);
// Paper end - ensure server conversions API
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0254-Improve-Item-Rarity-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 60eec8a12f01562678732bcf38ac407e70d74965..45fc5fab3817a8d9e1c83bcfb0add9eba023abfe 100644
index e7e825f10172b54f136de54214b8d25b311ae778..9a7191b7e74d28860e7ae26e3e06acf89845bbb6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -994,5 +994,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -985,5 +985,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public @NotNull String translationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0272-ItemStack-repair-check-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ index ce9bbe4a9010ca31ace1f0b7fb67eab0f13ac97d..5015cfe26522468ac7decbf6205d654c
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 45fc5fab3817a8d9e1c83bcfb0add9eba023abfe..ea50697a8dcdf87be046569b75fcc53ec870ca3e 100644
index 9a7191b7e74d28860e7ae26e3e06acf89845bbb6..09a050067ac985bb82fc880324153f8f8d48a964 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1006,5 +1006,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -997,5 +997,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public io.papermc.paper.inventory.ItemRarity getRarity() {
return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name());
}
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0340-Add-enchantWithLevels-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Deprecate upstream's newer and poorly implemented similar
API.

diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 579a9037b656bef9fb65c6da03611e981492074a..e1986aea72bb1f1ba2ea76f3ba53f274b6aac899 100644
index e244fb24975d4dfd91ca4d96e4c7ccb5f50e4a15..7a426338d5670ed4d29bd55d5cf7c3137e2d33f5 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -170,8 +170,11 @@ public interface ItemFactory {
Expand Down Expand Up @@ -46,7 +46,7 @@ index 579a9037b656bef9fb65c6da03611e981492074a..e1986aea72bb1f1ba2ea76f3ba53f274
ItemStack enchantItem(@NotNull final ItemStack item, final int level, final boolean allowTreasures);

// Paper start - Adventure
@@ -311,4 +320,22 @@ public interface ItemFactory {
@@ -302,4 +311,22 @@ public interface ItemFactory {
@Deprecated
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
// Paper end - bungee hover events
Expand All @@ -70,7 +70,7 @@ index 579a9037b656bef9fb65c6da03611e981492074a..e1986aea72bb1f1ba2ea76f3ba53f274
+ // Paper end - enchantWithLevels API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 1d1731776af5f59cd9e6bd07cb3b9fab5073ef66..9b2a62dc3da6718a3e8b39b4fb8bee3781e800cb 100644
index 7461c6c3cc3c2132613090c9227875504e6e8291..28bfdb059acaba2d8c724fba8f4eb2525ecd84c1 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -678,6 +678,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0374-ItemStack-damage-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ index 86c5ceddc722d28261f8a6d8368400fe2731aaf0..9f3e2903c955f2a5d1b25825c49188df
+ // Paper end - ItemStack damage API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 9b2a62dc3da6718a3e8b39b4fb8bee3781e800cb..e39c9167bd66c528c09b256f15cc6c58666f0ca0 100644
index 28bfdb059acaba2d8c724fba8f4eb2525ecd84c1..b321e00d280253e3a42a6027f6e62b5779a88ef8 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1090,5 +1090,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1081,5 +1081,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public boolean canRepair(@NotNull ItemStack toBeRepaired) {
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Allow proper checking of empty item stacks
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.

diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e39c9167bd66c528c09b256f15cc6c58666f0ca0..773780811a24aa1c1591257a993e30f2d99da436 100644
index b321e00d280253e3a42a6027f6e62b5779a88ef8..3c091386edaf09f43d52885af120bcb35a6e90a6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1104,5 +1104,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1095,5 +1095,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public @NotNull ItemStack damage(int amount, @NotNull org.bukkit.entity.LivingEntity livingEntity) {
return livingEntity.damageItemStack(this, amount);
}
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0441-ItemStack-Tooltip-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ index a0b02efdb3beed93cb1656e840f24cb98f5fd555..b503b5e13c51580367d53939ad4c19a7
+ @NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e6c69a54e0c1dc511fe5769f869dcecb13e04ed3..49390979cc0c68b8e719f2a2ce9e7d193c747959 100644
index 545d90cb00977432f91f8c5394e61c3090cb8d76..c4879c5a1012c2b188ad8ddfdd8a2b54d6b2d891 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1124,4 +1124,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1115,4 +1115,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return type.isAir() || amount <= 0;
}
// Paper end
Expand Down
Loading
Loading