mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
Missed the PluginMessageEvent
This commit is contained in:
parent
3c358c9c19
commit
f40592dee8
45
src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java
Normal file
45
src/main/java/net/md_5/bungee/plugin/PluginMessageEvent.java
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user