Enum RemoteServerDisconnectEvent.Cause
java.lang.Object
java.lang.Enum<RemoteServerDisconnectEvent.Cause>
de.marcely.bedwars.api.event.remote.RemoteServerDisconnectEvent.Cause
- All Implemented Interfaces:
Serializable
,Comparable<RemoteServerDisconnectEvent.Cause>
,java.lang.constant.Constable
- Enclosing class:
RemoteServerDisconnectEvent
public static enum RemoteServerDisconnectEvent.Cause
extends Enum<RemoteServerDisconnectEvent.Cause>
The reasons why no connection is further kept with this server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionServer relogged while we thought that it was still alive.The remote server hasn't received any ping responses from us since a while and timed us out.Server notified us that the connection loss is wanted.We haven't received any ping responses since a while. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static RemoteServerDisconnectEvent.Cause[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TIMEOUT
We haven't received any ping responses since a while.Server possibly lost internet connection or stopped without notifiying about a
SHUTDOWN
. -
SELF_TIMEOUT
The remote server hasn't received any ping responses from us since a while and timed us out.This is a really rare edge case, but actually occurred in the past. Main reason is likely that the used protocol server was overloaded for a longer period.
-
SHUTDOWN
Server notified us that the connection loss is wanted. -
RECONNECT
Server relogged while we thought that it was still alive.The
RemoteServerConnectEvent
will get called immediately after this event.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-