Painting improvements. Thanks CelticMinstrel!

Added interface to get/set the art and facing direction on paintings, and expanded painting break events to catch more cases (including fire and lightning); removed PaintingBreakByWorldEvent since it's identical to its superclass
This commit is contained in:
EvilSeph
2011-10-01 13:30:59 -04:00
parent ebb8fdd6bc
commit ab29f6a3b5
4 changed files with 147 additions and 22 deletions

View File

@@ -1,12 +0,0 @@
package org.bukkit.event.painting;
import org.bukkit.entity.Painting;
/**
* Triggered when a painting is removed by the world (water flowing over it, block damaged behind it)
*/
public class PaintingBreakByWorldEvent extends PaintingBreakEvent {
public PaintingBreakByWorldEvent(final Painting painting) {
super(painting, RemoveCause.WORLD);
}
}

View File

@@ -42,9 +42,20 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable {
*/
ENTITY,
/**
* Removed by the world - block the painting is on is destroyed, water flowing over etc
* Removed by fire
*/
WORLD
FIRE,
/**
* Removed by placing a block on it
*/
OBSTRUCTION,
/**
* Removed by water flowing over it
*/
WATER,
/**
* Removed by destroying the block behind it, etc
*/
PHYSICS,
}
}