package org.dynmap;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

/**
 * Custom Bukkit event, corresponding to the receiving of a web-chat message from a web UI user
 * 
 * This interface is Bukkit specific.
 */
public class DynmapWebChatEvent extends Event implements Cancellable {
    public static final String CUSTOM_TYPE = "org.dynmap.DynmapWebChatEvent";
    private String source;
    private String name;
    private String message;
    private boolean cancelled;
    private boolean isprocessed;
    
    public DynmapWebChatEvent(String source, String name, String message) {
        super(CUSTOM_TYPE);
        this.source = source;
        this.name = name;
        this.message = message;
        this.cancelled = false;
        this.isprocessed = false;
    }
    public boolean isCancelled() { return cancelled; }
    
    public void setCancelled(boolean cancel) { cancelled = cancel; }

    public String getSource() { return source; }
    
    public String getName() { return name; }
    
    public String getMessage() { return message; }
    
    /* Processed flag is used to mark message as handled by listener - if set, dynmap will not send it using broadcastMessage() */
    public boolean isProcessed() { return isprocessed; }
    
    public void setProcessed() { isprocessed = true; }
}

@@ -80,16 +80,53 @@
 t.Event;
+%0Aimport org.bukkit.event.HandlerList;
 %0A%0A/**%0A *
@@ -265,16 +265,44 @@
 ic.%0A */%0A
+@SuppressWarnings(%22serial%22)%0A
 public c
@@ -364,16 +364,16 @@
 lable %7B%0A
-
     publ
@@ -442,16 +442,83 @@
 Event%22;%0A
+    private static final HandlerList handlers = new HandlerList();%0A
     priv
@@ -1460,10 +1460,179 @@
 true; %7D%0A
+    %0A    @Override%0A    public HandlerList getHandlers() %7B%0A        return handlers;%0A    %7D%0A    public static HandlerList getHandlerList() %7B%0A        return handlers;%0A    %7D%0A
 %7D%0A

Update events for 1.1 event system (breaks 1.0 compatibility)