Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
FurnaceSmeltEvent.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 FurnaceSmeltEvent extends BlockEvent implements Cancellable {
13  private static final HandlerList handlers = new HandlerList();
14  private final ItemStack source;
15  private ItemStack result;
16  private boolean cancelled;
17 
18  public FurnaceSmeltEvent(final Block furnace, final ItemStack source, final ItemStack result) {
19  super(furnace);
20  this.source = source;
21  this.result = result;
22  this.cancelled = false;
23  }
24 
31  @Deprecated
32  public Block getFurnace() {
33  return getBlock();
34  }
35 
41  public ItemStack getSource() {
42  return source;
43  }
44 
50  public ItemStack getResult() {
51  return result;
52  }
53 
59  public void setResult(ItemStack result) {
60  this.result = result;
61  }
62 
63  public boolean isCancelled() {
64  return cancelled;
65  }
66 
67  public void setCancelled(boolean cancel) {
68  this.cancelled = cancel;
69  }
70 
71  @Override
73  return handlers;
74  }
75 
76  public static HandlerList getHandlerList() {
77  return handlers;
78  }
79 }