diff --git a/paper-api/src/main/java/org/bukkit/block/DecoratedPot.java b/paper-api/src/main/java/org/bukkit/block/DecoratedPot.java index a7327b7691..f76230e0bb 100644 --- a/paper-api/src/main/java/org/bukkit/block/DecoratedPot.java +++ b/paper-api/src/main/java/org/bukkit/block/DecoratedPot.java @@ -4,13 +4,15 @@ import java.util.List; import java.util.Map; import org.bukkit.Material; import org.bukkit.Tag; +import org.bukkit.inventory.BlockInventoryHolder; +import org.bukkit.inventory.DecoratedPotInventory; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Represents a captured state of a decorated pot. */ -public interface DecoratedPot extends TileState { +public interface DecoratedPot extends TileState, BlockInventoryHolder { /** * Set the sherd on the provided side. @@ -53,6 +55,21 @@ public interface DecoratedPot extends TileState { @NotNull public List getShards(); + /** + * @return inventory + * @see Container#getInventory() + */ + @NotNull + @Override + public DecoratedPotInventory getInventory(); + + /** + * @return snapshot inventory + * @see Container#getSnapshotInventory() + */ + @NotNull + public DecoratedPotInventory getSnapshotInventory(); + /** * A side on a decorated pot. Sides are relative to the facing state of a * {@link org.bukkit.block.data.type.DecoratedPot}. diff --git a/paper-api/src/main/java/org/bukkit/inventory/DecoratedPotInventory.java b/paper-api/src/main/java/org/bukkit/inventory/DecoratedPotInventory.java new file mode 100644 index 0000000000..3a80e71f5e --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/inventory/DecoratedPotInventory.java @@ -0,0 +1,29 @@ +package org.bukkit.inventory; + +import org.bukkit.block.DecoratedPot; +import org.jetbrains.annotations.Nullable; + +/** + * Interface to the inventory of a DecoratedPot. + */ +public interface DecoratedPotInventory extends Inventory { + + /** + * Set the item stack in the decorated pot. + * + * @param item the new item stack + */ + public void setItem(@Nullable ItemStack item); + + /** + * Get the item stack in the decorated pot. + * + * @return the current item stack + */ + @Nullable + public ItemStack getItem(); + + @Nullable + @Override + public DecoratedPot getHolder(); +}