Interface HandshakeData


@Deprecated public interface HandshakeData
Deprecated.
For advanced users only! You shouldn't play with this unless you know what you're doing.

This class allows you change specific things of a Bedrock player before it is applied to the server. Note that at the time I'm writing this that the HandshakeData is created after requesting the player link. So the link is present here, if applicable.
  • Method Details

    • isFloodgatePlayer

      boolean isFloodgatePlayer()
      Deprecated.
      Returns true if the given player is a Floodgate player, false otherwise.
    • getBedrockData

      BedrockData getBedrockData()
      Deprecated.
      Returns the decrypted BedrockData sent by Geyser or null if the player isn't a Floodgate player.
    • getJavaUsername

      String getJavaUsername()
      Deprecated.
    • getCorrectUsername

      String getCorrectUsername()
      Deprecated.
    • getJavaUniqueId

      UUID getJavaUniqueId()
      Deprecated.
    • getCorrectUniqueId

      UUID getCorrectUniqueId()
      Deprecated.
    • getLinkedPlayer

      LinkedPlayer getLinkedPlayer()
      Deprecated.
      Returns the linked account associated with the client or null if the player isn't linked or not a Floodgate player.
    • setLinkedPlayer

      void setLinkedPlayer(LinkedPlayer player)
      Deprecated.
      Set the LinkedPlayer. This will be ignored if the player isn't a Floodgate player
      Parameters:
      player - the player to use as link
    • getHostname

      String getHostname()
      Deprecated.
      Returns the hostname used in the handshake packet. This is the hostname after Floodgate removed the data.
    • setHostname

      void setHostname(String hostname)
      Deprecated.
      Set the hostname of the handshake packet. Changing it here will also change it in the handshake packet.
      Parameters:
      hostname - the new hostname
    • getIp

      String getIp()
      Deprecated.
      Returns the IP address of the client. The initial value is BedrockData.getIp() when BedrockData isn't null, or null if BedrockData is null. This method will return the changed IP if it has been changed using setIp(String)
    • setIp

      void setIp(String address)
      Deprecated.
      Set 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 :)
      Parameters:
      address - the IP address of the client
    • getDisconnectReason

      String getDisconnectReason()
      Deprecated.
      Returns the reason to disconnect the current player.
    • setDisconnectReason

      void setDisconnectReason(String reason)
      Deprecated.
      Set the reason to disconnect the current player.
      Parameters:
      reason - the reason to disconnect
    • shouldDisconnect

      default boolean shouldDisconnect()
      Deprecated.
      Returns if the player should be disconnected