diff --git a/src/com/massivecraft/mcore/event/MCoreAfterPlayerRespawnEvent.java b/src/com/massivecraft/mcore/event/MCoreAfterPlayerRespawnEvent.java index 685a3f0a..8a48437e 100644 --- a/src/com/massivecraft/mcore/event/MCoreAfterPlayerRespawnEvent.java +++ b/src/com/massivecraft/mcore/event/MCoreAfterPlayerRespawnEvent.java @@ -12,6 +12,7 @@ public class MCoreAfterPlayerRespawnEvent extends Event implements Runnable // -------------------------------------------- // // REQUIRED EVENT CODE // -------------------------------------------- // + private static final HandlerList handlers = new HandlerList(); @Override public HandlerList getHandlers() { return handlers; } public static HandlerList getHandlerList() { return handlers; } diff --git a/src/com/massivecraft/mcore/event/MCoreAfterPlayerTeleportEvent.java b/src/com/massivecraft/mcore/event/MCoreAfterPlayerTeleportEvent.java index ee3a5f58..c37f2771 100644 --- a/src/com/massivecraft/mcore/event/MCoreAfterPlayerTeleportEvent.java +++ b/src/com/massivecraft/mcore/event/MCoreAfterPlayerTeleportEvent.java @@ -14,6 +14,7 @@ public class MCoreAfterPlayerTeleportEvent extends Event implements Runnable // -------------------------------------------- // // REQUIRED EVENT CODE // -------------------------------------------- // + private static final HandlerList handlers = new HandlerList(); @Override public HandlerList getHandlers() { return handlers; } public static HandlerList getHandlerList() { return handlers; } diff --git a/src/com/massivecraft/mcore/event/MCoreCancellableEvent.java b/src/com/massivecraft/mcore/event/MCoreCancellableEvent.java deleted file mode 100644 index 9e56c2c6..00000000 --- a/src/com/massivecraft/mcore/event/MCoreCancellableEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.massivecraft.mcore.event; - -import org.bukkit.event.Cancellable; - -public abstract class MCoreCancellableEvent extends MCoreEvent implements Cancellable -{ - // -------------------------------------------- // - // FIELDS - // -------------------------------------------- // - - private boolean cancelled = false; - @Override public boolean isCancelled() { return this.cancelled; } - @Override public void setCancelled(boolean cancelled) { this.cancelled = cancelled; } - -} diff --git a/src/com/massivecraft/mcore/event/MCoreEvent.java b/src/com/massivecraft/mcore/event/MCoreEvent.java index 0409b39e..e5815d85 100644 --- a/src/com/massivecraft/mcore/event/MCoreEvent.java +++ b/src/com/massivecraft/mcore/event/MCoreEvent.java @@ -1,12 +1,27 @@ package com.massivecraft.mcore.event; +import java.util.LinkedHashMap; +import java.util.Map; + import org.bukkit.Bukkit; +import org.bukkit.event.Cancellable; import org.bukkit.event.Event; -public abstract class MCoreEvent extends Event implements Runnable +public abstract class MCoreEvent extends Event implements Runnable, Cancellable { // -------------------------------------------- // - // RUN + // FIELDS + // -------------------------------------------- // + + private final Map customData = new LinkedHashMap(); + public Map getCustomData() { return this.customData; } + + private boolean cancelled = false; + @Override public boolean isCancelled() { return this.cancelled; } + @Override public void setCancelled(boolean cancelled) { this.cancelled = cancelled; } + + // -------------------------------------------- // + // OVERRIDE: RUNNABLE // -------------------------------------------- // @Override diff --git a/src/com/massivecraft/mcore/event/MCorePlayerLeaveEvent.java b/src/com/massivecraft/mcore/event/MCorePlayerLeaveEvent.java index a7b1d6b5..4e962fe8 100644 --- a/src/com/massivecraft/mcore/event/MCorePlayerLeaveEvent.java +++ b/src/com/massivecraft/mcore/event/MCorePlayerLeaveEvent.java @@ -23,6 +23,7 @@ public class MCorePlayerLeaveEvent extends Event implements Runnable // -------------------------------------------- // // REQUIRED EVENT CODE // -------------------------------------------- // + private static final HandlerList handlers = new HandlerList(); @Override public HandlerList getHandlers() { return handlers; } public static HandlerList getHandlerList() { return handlers; }