Commits
Black Hole authored and md_5 committed 0c7aedbceab
1 1 | package org.bukkit.block; |
2 2 | |
3 3 | import java.util.List; |
4 4 | import java.util.Map; |
5 5 | import org.bukkit.Material; |
6 6 | import org.bukkit.Tag; |
7 + | import org.bukkit.inventory.BlockInventoryHolder; |
8 + | import org.bukkit.inventory.DecoratedPotInventory; |
7 9 | import org.jetbrains.annotations.NotNull; |
8 10 | import org.jetbrains.annotations.Nullable; |
9 11 | |
10 12 | /** |
11 13 | * Represents a captured state of a decorated pot. |
12 14 | */ |
13 - | public interface DecoratedPot extends TileState { |
15 + | public interface DecoratedPot extends TileState, BlockInventoryHolder { |
14 16 | |
15 17 | /** |
16 18 | * Set the sherd on the provided side. |
17 19 | * |
18 20 | * @param side the side to set |
19 21 | * @param sherd the sherd, or null to set a blank side. |
20 22 | * @throws IllegalArgumentException if the sherd is not either |
21 23 | * tagged by {@link Tag#ITEMS_DECORATED_POT_SHERDS}, {@link Material#BRICK}, |
22 24 | * or {@code null} |
23 25 | */ |
46 48 | * Gets the sherds on this decorated pot. For faces without a specific sherd, |
47 49 | * {@link Material#BRICK} is used in its place. |
48 50 | * |
49 51 | * @return the sherds |
50 52 | * @deprecated in favor of {@link #getSherds()} |
51 53 | */ |
52 54 | |
53 55 | |
54 56 | public List<Material> getShards(); |
55 57 | |
58 + | /** |
59 + | * @return inventory |
60 + | * @see Container#getInventory() |
61 + | */ |
62 + | |
63 + | |
64 + | public DecoratedPotInventory getInventory(); |
65 + | |
66 + | /** |
67 + | * @return snapshot inventory |
68 + | * @see Container#getSnapshotInventory() |
69 + | */ |
70 + | |
71 + | public DecoratedPotInventory getSnapshotInventory(); |
72 + | |
56 73 | /** |
57 74 | * A side on a decorated pot. Sides are relative to the facing state of a |
58 75 | * {@link org.bukkit.block.data.type.DecoratedPot}. |
59 76 | */ |
60 77 | public static enum Side { |
61 78 | BACK, |
62 79 | LEFT, |
63 80 | RIGHT, |
64 81 | FRONT |
65 82 | } |
66 83 | } |