From f0bdeecfc35f492bd8b81ad517e209611fff0d6f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:35 +0300 Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java index 8d8f09879..97fa7807b 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -350,4 +350,33 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { Spigot spigot(); // Spigot end + // Paper start - Add an API for CanPlaceOn and CanDestroy NBT values + /** + * Gets set of materials what given item can destroy in {@link org.bukkit.GameMode#ADVENTURE} + * + * @return Set of materials + */ + Set getCanDestroy(); + + /** + * Sets set of materials what given item can destroy in {@link org.bukkit.GameMode#ADVENTURE} + * + * @param canDestroy Set of materials + */ + void setCanDestroy(Set canDestroy); + + /** + * Gets set of materials where given item can be placed on in {@link org.bukkit.GameMode#ADVENTURE} + * + * @return Set of materials + */ + Set getCanPlaceOn(); + + /** + * Sets set of materials where given item can be placed on in {@link org.bukkit.GameMode#ADVENTURE} + * + * @param canPlaceOn Set of materials + */ + void setCanPlaceOn(Set canPlaceOn); + // Paper end } -- 2.19.0