summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-06-30 23:03:26 -0400
committerEvilSeph <evilseph@unaligned.org>2011-07-02 20:44:11 -0400
commit180536920cc339bb2b0b72ad995640eea872fe9d (patch)
tree7e477bda5aac28f577041bde6770bfd837565d3a
parent212849fc2152c986a326fc0eacf235369cc8342f (diff)
downloadbukkit-180536920cc339bb2b0b72ad995640eea872fe9d.tar
bukkit-180536920cc339bb2b0b72ad995640eea872fe9d.tar.gz
bukkit-180536920cc339bb2b0b72ad995640eea872fe9d.tar.lz
bukkit-180536920cc339bb2b0b72ad995640eea872fe9d.tar.xz
bukkit-180536920cc339bb2b0b72ad995640eea872fe9d.zip
Improved FurnaceBurn event.
- Added the ability to set the burn time of the fuel. - Added the ability to set if a fuel should burn or not.
-rw-r--r--src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
index ed1f489b..dd60a903 100644
--- a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
@@ -12,6 +12,7 @@ public class FurnaceBurnEvent extends Event implements Cancellable {
private ItemStack fuel;
private int burnTime;
private boolean cancelled;
+ private boolean burning;
public FurnaceBurnEvent(Block furnace, ItemStack fuel, int burnTime) {
super(Type.FURNACE_BURN);
@@ -20,6 +21,7 @@ public class FurnaceBurnEvent extends Event implements Cancellable {
this.fuel = fuel;
this.burnTime = burnTime;
this.cancelled = false;
+ this.burning = true;
}
/**
@@ -41,15 +43,42 @@ public class FurnaceBurnEvent extends Event implements Cancellable {
}
/**
- * Gets the default burn time for this fuel
+ * Gets the burn time for this fuel
*
- * @return the default burn time for this fuel
+ * @return the burn time for this fuel
*/
public int getBurnTime() {
return burnTime;
}
/**
+ * Sets the burn time for this fuel
+ *
+ * @param burnTime the burn time for this fuel
+ */
+ public void setBurnTime(int burnTime) {
+ this.burnTime = burnTime;
+ }
+
+ /**
+ * Gets whether the furnace's fuel is burning or not.
+ *
+ * @return whether the furnace's fuel is burning or not.
+ */
+ public boolean isBurning() {
+ return this.burning;
+ }
+
+ /**
+ * Sets whether the furnace's fuel is burning or not.
+ *
+ * @param burning true if the furnace's fuel is burning
+ */
+ public void setBurning(boolean burning) {
+ this.burning = burning;
+ }
+
+ /**
* Gets the cancellation state of this event. A cancelled event will not
* be executed in the server, but will still pass to other plugins
*