Add player disconnect event, thanks @lazertester
This commit is contained in:
@@ -11,8 +11,8 @@ import net.md_5.bungee.api.plugin.Event;
|
||||
* Event called to represent a player logging in.
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class LoginEvent extends Event implements Cancellable
|
||||
{
|
||||
|
||||
|
@@ -0,0 +1,23 @@
|
||||
package net.md_5.bungee.api.event;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.plugin.Event;
|
||||
|
||||
/**
|
||||
* Called when a player has left the proxy, it is not safe to call any methods
|
||||
* that perform an action on the passed player instance.
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayerDisconnectEvent extends Event
|
||||
{
|
||||
|
||||
/**
|
||||
* Player disconnecting.
|
||||
*/
|
||||
private final ProxiedPlayer player;
|
||||
}
|
@@ -13,8 +13,8 @@ import net.md_5.bungee.api.plugin.Event;
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ProxyPingEvent extends Event
|
||||
{
|
||||
|
||||
|
@@ -10,8 +10,8 @@ import net.md_5.bungee.api.plugin.Event;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ServerConnectEvent extends Event
|
||||
{
|
||||
|
||||
|
@@ -14,8 +14,8 @@ import net.md_5.bungee.api.plugin.Event;
|
||||
* information to the server before the player logs in.
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ServerConnectedEvent extends Event
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user