1 + | package org.bukkit.event.block; |
2 + | |
3 + | import org.bukkit.block.Block; |
4 + | import org.bukkit.event.Cancellable; |
5 + | import org.bukkit.event.HandlerList; |
6 + | |
7 + | import java.util.List; |
8 + | |
9 + | |
10 + | |
11 + | |
12 + | public class BlockExplodeEvent extends BlockEvent implements Cancellable { |
13 + | private static final HandlerList handlers = new HandlerList(); |
14 + | private boolean cancel; |
15 + | private final List<Block> blocks; |
16 + | private float yield; |
17 + | |
18 + | public BlockExplodeEvent(final Block what, final List<Block> blocks, final float yield) { |
19 + | super(what); |
20 + | this.blocks = blocks; |
21 + | this.yield = yield; |
22 + | this.cancel = false; |
23 + | } |
24 + | |
25 + | public boolean isCancelled() { |
26 + | return cancel; |
27 + | } |
28 + | |
29 + | public void setCancelled(boolean cancel) { |
30 + | this.cancel = cancel; |
31 + | } |
32 + | |
33 + | |
34 + | |
35 + | |
36 + | |
37 + | |
38 + | |
39 + | public List<Block> blockList() { |
40 + | return blocks; |
41 + | } |
42 + | |
43 + | |
44 + | |
45 + | |
46 + | |
47 + | |
48 + | public float getYield() { |
49 + | return yield; |
50 + | } |
51 + | |
52 + | |
53 + | |
54 + | |
55 + | |
56 + | |
57 + | public void setYield(float yield) { |
58 + | this.yield = yield; |
59 + | } |
60 + | |
61 + | @Override |
62 + | public HandlerList getHandlers() { |
63 + | return handlers; |
64 + | } |
65 + | |
66 + | public static HandlerList getHandlerList() { |
67 + | return handlers; |
68 + | } |
69 + | } |