From f40592dee8f424291a42ea5f8a3f920048080887 Mon Sep 17 00:00:00 2001 From: Steven Scott Date: Sat, 24 Nov 2012 16:14:44 -0800 Subject: [PATCH] Missed the PluginMessageEvent --- .../bungee/plugin/PluginMessageEvent.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java diff --git a/src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java b/src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java new file mode 100644 index 00000000..4db6b5fb --- /dev/null +++ b/src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java @@ -0,0 +1,45 @@ +package net.md_5.bungee.plugin; + +import lombok.Data; +import net.md_5.bungee.UserConnection; + +/** + * Event called when the decision is made to decide which server to connect to. + */ +@Data +public class PluginMessageEvent implements Cancellable +{ + /** + * Canceled state. + */ + private boolean cancelled; + /** + * Message to use when kicking if this event is canceled. + */ + private String cancelReason; + /** + * Whether this packet is destined for the server or the client + */ + private final Destination destination; + /** + * User in question + */ + private final UserConnection connection; + /** + * Tag specified for this plugin message. + */ + private String tag; + /** + * Data contained in this plugin message. + */ + private String data; + + /** + * An enum that signifies the destination for this packet + */ + public enum Destination + { + SERVER, + CLIENT + } +}