From c3ecd0d6800384ab0cf1dd7cc6b20c55cd2515f7 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 22 Nov 2016 14:35:51 +1100 Subject: [PATCH] Add Unbreakable to ItemMeta By: md_5 --- .../java/org/bukkit/inventory/meta/ItemMeta.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 459e09ca5a..fa3efe36db 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 @@ -155,6 +155,21 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { */ boolean hasItemFlag(ItemFlag flag); + /** + * Return if the unbreakable tag is true. An unbreakable item will not lose + * durability. + * + * @return true if the unbreakable tag is true + */ + boolean isUnbreakable(); + + /** + * Sets the unbreakable tag. An unbreakable item will not lose durability. + * + * @param unbreakable true if set unbreakable + */ + void setUnbreakable(boolean unbreakable); + @SuppressWarnings("javadoc") ItemMeta clone(); }