From db62df707b4a5fa662c9b199c32c2de643748974 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 26 Jun 2020 10:58:14 +1000 Subject: [PATCH] #514: Add visibility and fixed API for ItemFrames By: SydMontague --- .../java/org/bukkit/entity/ItemFrame.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/ItemFrame.java b/paper-api/src/main/java/org/bukkit/entity/ItemFrame.java index e876bd20a..e34d40875 100644 --- a/paper-api/src/main/java/org/bukkit/entity/ItemFrame.java +++ b/paper-api/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); }