001 package org.bukkit.entity;
002
003 import org.bukkit.Art;
004 import org.bukkit.event.painting.PaintingBreakEvent;
005
006 /**
007 * Represents a Painting.
008 */
009 public interface Painting extends Hanging {
010
011 /**
012 * Get the art on this painting
013 *
014 * @return The art
015 */
016 public Art getArt();
017
018 /**
019 * Set the art on this painting
020 *
021 * @param art The new art
022 * @return False if the new art won't fit at the painting's current
023 * location
024 */
025 public boolean setArt(Art art);
026
027 /**
028 * Set the art on this painting
029 *
030 * @param art The new art
031 * @param force If true, force the new art regardless of whether it fits
032 * at the current location. Note that forcing it where it can't fit
033 * normally causes it to drop as an item unless you override this by
034 * catching the {@link PaintingBreakEvent}.
035 * @return False if force was false and the new art won't fit at the
036 * painting's current location
037 */
038 public boolean setArt(Art art, boolean force);
039 }