summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-06-01 17:08:06 +1000
committermd_5 <git@md-5.net>2016-06-03 20:38:40 +1000
commit196238497b7aad6eabcf2413f2a95399a15c3d34 (patch)
treee75929509337215474ea35a8e738cedf6ef2b68f
parent434c29cbe18537e193927375d15741935eb84d3b (diff)
downloadbukkit-196238497b7aad6eabcf2413f2a95399a15c3d34.tar
bukkit-196238497b7aad6eabcf2413f2a95399a15c3d34.tar.gz
bukkit-196238497b7aad6eabcf2413f2a95399a15c3d34.tar.lz
bukkit-196238497b7aad6eabcf2413f2a95399a15c3d34.tar.xz
bukkit-196238497b7aad6eabcf2413f2a95399a15c3d34.zip
SPIGOT-1292: BlockState based FlowerPot API.
-rw-r--r--src/main/java/org/bukkit/block/FlowerPot.java23
-rw-r--r--src/main/java/org/bukkit/material/FlowerPot.java4
2 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/FlowerPot.java b/src/main/java/org/bukkit/block/FlowerPot.java
new file mode 100644
index 00000000..3db6f804
--- /dev/null
+++ b/src/main/java/org/bukkit/block/FlowerPot.java
@@ -0,0 +1,23 @@
+package org.bukkit.block;
+
+import org.bukkit.material.MaterialData;
+
+public interface FlowerPot extends BlockState {
+
+ /**
+ * Gets the item present in this flower pot.
+ *
+ * @return item present, or null for empty.
+ */
+ MaterialData getContents();
+
+ /**
+ * Sets the item present in this flower pot.
+ *
+ * NOTE: The Vanilla Minecraft client will currently not refresh this until
+ * a block update is triggered.
+ *
+ * @param item new item, or null for empty.
+ */
+ void setContents(MaterialData item);
+}
diff --git a/src/main/java/org/bukkit/material/FlowerPot.java b/src/main/java/org/bukkit/material/FlowerPot.java
index 7f3574eb..a3951e7a 100644
--- a/src/main/java/org/bukkit/material/FlowerPot.java
+++ b/src/main/java/org/bukkit/material/FlowerPot.java
@@ -6,7 +6,11 @@ import org.bukkit.TreeSpecies;
/**
* Represents a flower pot.
+ *
+ * @deprecated Flower pots are now tile entities, use
+ * {@link org.bukkit.block.FlowerPot}.
*/
+@Deprecated
public class FlowerPot extends MaterialData {
/**