From bc69ab513e5345e96e98077599659ba293364bcd Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 1 Jun 2016 17:08:06 +1000 Subject: [PATCH] SPIGOT-1292: BlockState based FlowerPot API. By: md_5 --- .../main/java/org/bukkit/block/FlowerPot.java | 23 +++++++++++++++++++ .../java/org/bukkit/material/FlowerPot.java | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 paper-api/src/main/java/org/bukkit/block/FlowerPot.java diff --git a/paper-api/src/main/java/org/bukkit/block/FlowerPot.java b/paper-api/src/main/java/org/bukkit/block/FlowerPot.java new file mode 100644 index 0000000000..3db6f8047b --- /dev/null +++ b/paper-api/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/paper-api/src/main/java/org/bukkit/material/FlowerPot.java b/paper-api/src/main/java/org/bukkit/material/FlowerPot.java index 7f3574eb25..a3951e7a6e 100644 --- a/paper-api/src/main/java/org/bukkit/material/FlowerPot.java +++ b/paper-api/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 { /**