Commits

Lukas A authored and md_5 committed daec93fe81b
SPIGOT-2695: Added BrewingStandFuelEvent and added fuel level to the BrewEvent
No tags

src/main/java/org/bukkit/event/inventory/BrewEvent.java

Modified
6 6 import org.bukkit.event.block.BlockEvent;
7 7 import org.bukkit.inventory.BrewerInventory;
8 8
9 9 /**
10 10 * Called when the brewing of the contents inside the Brewing Stand is
11 11 * complete.
12 12 */
13 13 public class BrewEvent extends BlockEvent implements Cancellable {
14 14 private static final HandlerList handlers = new HandlerList();
15 15 private BrewerInventory contents;
16 + private int fuelLevel;
16 17 private boolean cancelled;
17 18
18 - public BrewEvent(Block brewer, BrewerInventory contents) {
19 + public BrewEvent(Block brewer, BrewerInventory contents, int fuelLevel) {
19 20 super(brewer);
20 21 this.contents = contents;
22 + this.fuelLevel = fuelLevel;
21 23 }
22 24
23 25 /**
24 26 * Gets the contents of the Brewing Stand.
25 27 *
26 28 * @return the contents
27 29 */
28 30 public BrewerInventory getContents() {
29 31 return contents;
30 32 }
31 33
34 + /**
35 + * Gets the remaining fuel level.
36 + *
37 + * @return the remaining fuel
38 + */
39 + public int getFuelLevel() {
40 + return fuelLevel;
41 + }
42 +
32 43 public boolean isCancelled() {
33 44 return cancelled;
34 45 }
35 46
36 47 public void setCancelled(boolean cancel) {
37 48 cancelled = cancel;
38 49 }
39 50
40 51 @Override
41 52 public HandlerList getHandlers() {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut