Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
FurnaceBurnEvent.java
Go to the documentation of this file.
1 package org.bukkit.event.inventory;
2 
3 import org.bukkit.block.Block;
4 import org.bukkit.event.Cancellable;
5 import org.bukkit.event.HandlerList;
6 import org.bukkit.event.block.BlockEvent;
7 import org.bukkit.inventory.ItemStack;
8 
12 public class FurnaceBurnEvent extends BlockEvent implements Cancellable {
13  private static final HandlerList handlers = new HandlerList();
14  private final ItemStack fuel;
15  private int burnTime;
16  private boolean cancelled;
17  private boolean burning;
18 
19  public FurnaceBurnEvent(final Block furnace, final ItemStack fuel, final int burnTime) {
20  super(furnace);
21  this.fuel = fuel;
22  this.burnTime = burnTime;
23  this.cancelled = false;
24  this.burning = true;
25  }
26 
33  @Deprecated
34  public Block getFurnace() {
35  return getBlock();
36  }
37 
43  public ItemStack getFuel() {
44  return fuel;
45  }
46 
52  public int getBurnTime() {
53  return burnTime;
54  }
55 
61  public void setBurnTime(int burnTime) {
62  this.burnTime = burnTime;
63  }
64 
70  public boolean isBurning() {
71  return this.burning;
72  }
73 
79  public void setBurning(boolean burning) {
80  this.burning = burning;
81  }
82 
83  public boolean isCancelled() {
84  return cancelled;
85  }
86 
87  public void setCancelled(boolean cancel) {
88  this.cancelled = cancel;
89  }
90 
91  @Override
93  return handlers;
94  }
95 
96  public static HandlerList getHandlerList() {
97  return handlers;
98  }
99 }