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

By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
Bukkit/Spigot
2011-10-01 13:30:59 -04:00
parent 5db08677a3
commit 367dbc663e
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,
}
}