diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index d80b0a5296..88cdce67e6 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -449,6 +449,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return level; } + /** + * Removes all enchantments on this ItemStack. + */ + public void removeEnchantments() { + if (meta == null) { + return; + } + + meta.removeEnchantments(); + } + @Override @NotNull @Utility diff --git a/paper-api/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/paper-api/src/main/java/org/bukkit/inventory/meta/ItemMeta.java index 8ca9605fc1..9f159ac909 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/paper-api/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -187,6 +187,11 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean removeEnchant(@NotNull Enchantment ench); + /** + * Removes all enchantments from this item meta. + */ + void removeEnchantments(); + /** * Checks if the specified enchantment conflicts with any enchantments in * this ItemMeta.