Class PacketHandler.DisconnectReason

java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler.DisconnectReason
Enclosing class:
PacketHandler

public static class PacketHandler.DisconnectReason extends Object
  • Method Details

    • getServerDisconnectReason

      @Nullable public String getServerDisconnectReason()
      If the server initiated the disconnect, returns the kick message as plain text. If the disconnect was initiated by the client, returns null.
      Returns:
      The kick message or null
    • getServerDisconnectReasonFormatted

      @Nullable public FormattedMessage getServerDisconnectReasonFormatted()
      If the server initiated the disconnect, returns the formatted kick message.
      Returns:
      The formatted kick message or null
    • setServerDisconnectReason

      public void setServerDisconnectReason(@Nullable FormattedMessage serverDisconnectReason)
    • setServerDisconnectReason

      @Deprecated public void setServerDisconnectReason(@Nullable String serverDisconnectReason)
      Deprecated.
    • getClientDisconnectType

      @Nullable public DisconnectType getClientDisconnectType()
      If the disconnect was initiated by the client, returns the disconnect type. Returns null if the disconnect was initiated by the server.
      Returns:
      The disconnect type or null
    • setClientDisconnectType

      public void setClientDisconnectType(DisconnectType clientDisconnectType)
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object