Class HandshakeDataImpl
java.lang.Object
org.geysermc.floodgate.core.addon.data.HandshakeDataImpl
- All Implemented Interfaces:
HandshakeData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyChanges(FloodgateConnection connection, FloodgateConfig config) org.geysermc.floodgate.util.BedrockDataReturns the decrypted BedrockData sent by Geyser or null if the player isn't a Floodgate player.Returns the reason to disconnect the current player.Returns the hostname used in the handshake packet.getIp()Returns the IP address of the client.org.geysermc.floodgate.util.LinkedPlayerReturns the linked account associated with the client or null if the player isn't linked or not a Floodgate player.booleanReturns true if the given player is a Floodgate player, false otherwise.voidsetDisconnectReason(String disconnectReason) Set the reason to disconnect the current player.voidsetHostname(String hostname) Set the hostname of the handshake packet.voidSet the IP address of the connected client.voidsetLinkedPlayer(org.geysermc.floodgate.util.LinkedPlayer linkedPlayer) Set the LinkedPlayer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.floodgate.core.api.handshake.HandshakeData
shouldDisconnect
-
Constructor Details
-
HandshakeDataImpl
-
-
Method Details
-
applyChanges
-
getCorrectUsername
- Specified by:
getCorrectUsernamein interfaceHandshakeData
-
getCorrectUniqueId
- Specified by:
getCorrectUniqueIdin interfaceHandshakeData
-
isFloodgatePlayer
public boolean isFloodgatePlayer()Description copied from interface:HandshakeDataReturns true if the given player is a Floodgate player, false otherwise.- Specified by:
isFloodgatePlayerin interfaceHandshakeData
-
getBedrockData
public org.geysermc.floodgate.util.BedrockData getBedrockData()Description copied from interface:HandshakeDataReturns the decrypted BedrockData sent by Geyser or null if the player isn't a Floodgate player.- Specified by:
getBedrockDatain interfaceHandshakeData
-
getJavaUsername
- Specified by:
getJavaUsernamein interfaceHandshakeData
-
getJavaUniqueId
- Specified by:
getJavaUniqueIdin interfaceHandshakeData
-
getLinkedPlayer
public org.geysermc.floodgate.util.LinkedPlayer getLinkedPlayer()Description copied from interface:HandshakeDataReturns the linked account associated with the client or null if the player isn't linked or not a Floodgate player.- Specified by:
getLinkedPlayerin interfaceHandshakeData
-
getHostname
Description copied from interface:HandshakeDataReturns the hostname used in the handshake packet. This is the hostname after Floodgate removed the data.- Specified by:
getHostnamein interfaceHandshakeData
-
getIp
Description copied from interface:HandshakeDataReturns the IP address of the client. The initial value isBedrockData.getIp()when BedrockData isn't null, or null if BedrockData is null. This method will return the changed IP if it has been changed usingHandshakeData.setIp(String)- Specified by:
getIpin interfaceHandshakeData
-
getDisconnectReason
Description copied from interface:HandshakeDataReturns the reason to disconnect the current player.- Specified by:
getDisconnectReasonin interfaceHandshakeData
-
setLinkedPlayer
public void setLinkedPlayer(org.geysermc.floodgate.util.LinkedPlayer linkedPlayer) Description copied from interface:HandshakeDataSet the LinkedPlayer. This will be ignored if the player isn't a Floodgate player- Specified by:
setLinkedPlayerin interfaceHandshakeData- Parameters:
linkedPlayer- the player to use as link
-
setHostname
Description copied from interface:HandshakeDataSet the hostname of the handshake packet. Changing it here will also change it in the handshake packet.- Specified by:
setHostnamein interfaceHandshakeData- Parameters:
hostname- the new hostname
-
setIp
Description copied from interface:HandshakeDataSet the IP address of the connected client. Floodgate doesn't perform any checks if the provided data is valid (hence one of the reasons why this class has been made for advanced users), thank you for not abusing Floodgate's trust in you :)- Specified by:
setIpin interfaceHandshakeData- Parameters:
ip- the IP address of the client
-
setDisconnectReason
Description copied from interface:HandshakeDataSet the reason to disconnect the current player.- Specified by:
setDisconnectReasonin interfaceHandshakeData- Parameters:
disconnectReason- the reason to disconnect
-