From 9a6a5a664c15127db80ae154523f9f8b9afd51ba Mon Sep 17 00:00:00 2001 From: SydMontague Date: Fri, 26 Jun 2020 10:58:14 +1000 Subject: [PATCH] #514: Add visibility and fixed API for ItemFrames --- .../java/org/bukkit/entity/ItemFrame.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/org/bukkit/entity/ItemFrame.java b/src/main/java/org/bukkit/entity/ItemFrame.java index e876bd20..e34d4087 100644 --- a/src/main/java/org/bukkit/entity/ItemFrame.java +++ b/src/main/java/org/bukkit/entity/ItemFrame.java @@ -48,4 +48,40 @@ public interface ItemFrame extends Hanging { * @throws IllegalArgumentException if rotation is null */ public void setRotation(@NotNull Rotation rotation) throws IllegalArgumentException; + + /** + * Returns whether the item frame is be visible or not. + * + * @return whether the item frame is visible or not + */ + boolean isVisible(); + + /** + * Sets whether the item frame should be visible or not. + * + * @param visible whether the item frame is visible or not + */ + void setVisible(boolean visible); + + /** + * Returns whether the item frame is "fixed" or not. + * + * When true it's not possible to destroy/move the frame (e.g. by damage, + * interaction, pistons, or missing supporting blocks), rotate the item or + * place/remove items. + * + * @return whether the item frame is fixed or not + */ + boolean isFixed(); + + /** + * Sets whether the item frame should be fixed or not. + * + * When set to true it's not possible to destroy/move the frame (e.g. by + * damage, interaction, pistons, or missing supporting blocks), rotate the + * item or place/remove items. + * + * @param visible whether the item frame is fixed or not + */ + void setFixed(boolean visible); }