[Bleeding] Changed event system into a new, much faster design. Huge thanks to @zml2008 & @lahwran.
This commit is contained in:
@@ -3,6 +3,7 @@ package org.bukkit.event.inventory;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FurnaceBurnEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Block furnace;
|
||||
private ItemStack fuel;
|
||||
private int burnTime;
|
||||
@@ -87,4 +89,13 @@ public class FurnaceBurnEvent extends Event implements Cancellable {
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.event.inventory;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FurnaceSmeltEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Block furnace;
|
||||
private ItemStack source;
|
||||
private ItemStack result;
|
||||
@@ -67,4 +69,13 @@ public class FurnaceSmeltEvent extends Event implements Cancellable {
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.event.Listener;
|
||||
/**
|
||||
* Handles all events thrown in relation to Blocks
|
||||
*/
|
||||
@Deprecated
|
||||
public class InventoryListener implements Listener {
|
||||
public InventoryListener() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user