2018-10-25 12:01:38 +02:00
|
|
|
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
|
2018-09-23 05:30:54 +02:00
|
|
|
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
|
2018-10-25 12:01:38 +02:00
|
|
|
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
2018-09-23 05:30:54 +02:00
|
|
|
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
|
|
|
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
2018-10-25 12:01:38 +02:00
|
|
|
@@ -348,4 +348,33 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
|
2018-09-23 05:30:54 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
--
|
2018-10-25 12:01:38 +02:00
|
|
|
2.19.1
|
2018-09-23 05:30:54 +02:00
|
|
|
|