blob: 9b00384d197a6315782f8e285eab38f70009efbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
package org.bukkit.event.inventory;
import org.bukkit.block.Block;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.inventory.ItemStack;
/**
* Called when an ItemStack is successfully smelted in a furnace.
*/
@SuppressWarnings("serial")
public class FurnaceSmeltEvent extends Event implements Cancellable {
private Block furnace;
private ItemStack source;
private ItemStack result;
private boolean cancelled;
public FurnaceSmeltEvent(Block furnace, ItemStack source, ItemStack result) {
super(Type.FURNACE_SMELT);
this.furnace = furnace;
this.source = source;
this.result = result;
this.cancelled = false;
}
/**
* Gets the block for the furnace involved in this event
*
* @return the block of the furnace
*/
public Block getFurnace() {
return furnace;
}
/**
* Gets the smelted ItemStack for this event
*
* @return smelting source ItemStack
*/
public ItemStack getSource() {
return source;
}
/**
* Gets the resultant ItemStack for this event
*
* @return smelting result ItemStack
*/
public ItemStack getResult() {
return result;
}
/**
* Sets the resultant ItemStack for this event
*
* @param result new result ItemStack
*/
public void setResult(ItemStack result) {
this.result = result;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
}
|