Interface ItemFrame

    • Method Detail

      • getItem

        @NotNull
        ItemStack getItem()
        Get the item in this frame
        Returns:
        a defensive copy the item in this item frame
      • setItem

        void setItem​(@Nullable
                     ItemStack item)
        Set the item in this frame
        Parameters:
        item - the new item
      • setItem

        void setItem​(@Nullable
                     ItemStack item,
                     boolean playSound)
        Set the item in this frame
        Parameters:
        item - the new item
        playSound - whether or not to play the item placement sound
      • getRotation

        @NotNull
        Rotation getRotation()
        Get the rotation of the frame's item
        Returns:
        the direction
      • isVisible

        boolean isVisible()
        Returns whether the item frame is be visible or not.
        Returns:
        whether the item frame is visible or not
      • setVisible

        void setVisible​(boolean visible)
        Sets whether the item frame should be visible or not.
        Parameters:
        visible - whether the item frame is visible or not
      • isFixed

        boolean isFixed()
        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.
        Returns:
        whether the item frame is fixed or not
      • setFixed

        void setFixed​(boolean visible)
        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.
        Parameters:
        visible - whether the item frame is fixed or not