Contents
Class PacketHandler.DisconnectReason
java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler.DisconnectReason
- Enclosing class:
PacketHandler
-
Method Summary
Modifier and TypeMethodDescriptionIf the disconnect was initiated by the client, returns the disconnect type.If the server initiated the disconnect, returns the kick message as plain text.If the server initiated the disconnect, returns the formatted kick message.voidsetClientDisconnectType(DisconnectType clientDisconnectType) voidsetServerDisconnectReason(FormattedMessage serverDisconnectReason) voidsetServerDisconnectReason(String serverDisconnectReason) Deprecated.toString()
-
Method Details
-
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
If the server initiated the disconnect, returns the formatted kick message.- Returns:
- The formatted kick message or null
-
setServerDisconnectReason
-
setServerDisconnectReason
Deprecated.UsesetServerDisconnectReason(FormattedMessage)withMessage.raw(String).getFormattedMessage() instead. -
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
-
toString
-
setServerDisconnectReason(FormattedMessage)withMessage.raw(String).getFormattedMessage() instead.