Add API for ItemFrames. Adds BUKKIT-2668
As well as adding methods for ItemFrames, this moves some methods previously contained in Painting to Hanging, as they are shared by both classes. An enum was added that represents rotations, similar to a clock-face. This is needed as a contrast to cardinal direction based rotations. By: h31ix <effectsdude@gmail.com>
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Art;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.event.painting.PaintingBreakEvent;
|
||||
import org.bukkit.material.Attachable;
|
||||
|
||||
/**
|
||||
* Represents a Painting.
|
||||
*/
|
||||
public interface Painting extends Entity, Attachable {
|
||||
public interface Painting extends Hanging {
|
||||
/**
|
||||
* Get the art on this painting
|
||||
*
|
||||
@@ -34,14 +32,4 @@ public interface Painting extends Entity, Attachable {
|
||||
* @return False if force was false and the new art won't fit at the painting's current location
|
||||
*/
|
||||
public boolean setArt(Art art, boolean force);
|
||||
|
||||
/**
|
||||
* Sets the direction of the painting, potentially overriding rules of placement. Note that if the result
|
||||
* is not valid the painting would normally drop as an item.
|
||||
*
|
||||
* @param face The new direction.
|
||||
* @param force Whether to force it.
|
||||
* @return False if force was false and there was no block for it to attach to in order to face the given direction.
|
||||
*/
|
||||
public boolean setFacingDirection(BlockFace face, boolean force);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user