48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
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 7ac07ac07ac0..7ac07ac07ac0 100644
|
|
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
|
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
|
@@ -348,4 +348,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<org.bukkit.Material> getCanDestroy();
|
|
+
|
|
+ /**
|
|
+ * Sets set of materials what given item can destroy in {@link org.bukkit.GameMode#ADVENTURE}
|
|
+ *
|
|
+ * @param canDestroy Set of materials
|
|
+ */
|
|
+ void setCanDestroy(Set<org.bukkit.Material> canDestroy);
|
|
+
|
|
+ /**
|
|
+ * Gets set of materials where given item can be placed on in {@link org.bukkit.GameMode#ADVENTURE}
|
|
+ *
|
|
+ * @return Set of materials
|
|
+ */
|
|
+ Set<org.bukkit.Material> 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<org.bukkit.Material> canPlaceOn);
|
|
+ // Paper end
|
|
}
|
|
--
|
|
2.19.1
|
|
|