Add PlayerHandshakeEvent which allows changing of versions and online mode status amongst other things.

This commit is contained in:
marvin
2013-09-30 09:22:49 +10:00
committed by md_5
parent 33e11f4c44
commit a0d94282f6
3 changed files with 51 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
package net.md_5.bungee.api.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.protocol.packet.Packet2Handshake;
import net.md_5.bungee.api.plugin.Event;
/**
* Event called to represent a player first making their presence and username
* known.
*/
@Data
@ToString(callSuper = false)
@EqualsAndHashCode(callSuper = false)
public class PlayerHandshakeEvent extends Event
{
/**
* Connection attempting to login.
*/
private final PendingConnection connection;
/**
* The handshake.
*/
private final Packet2Handshake handshake;
public PlayerHandshakeEvent(PendingConnection connection, Packet2Handshake handshake)
{
this.connection = connection;
this.handshake = handshake;
}
}