Package wtf.choco.veinminer.network
Enum Class MessageDirection
- All Implemented Interfaces:
Serializable
,Comparable<MessageDirection>
,Constable
A direction in which a
PluginMessage
may be sent over the protocol.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA message sent from server to the client.A message sent from the client to the server. -
Method Summary
Modifier and TypeMethodDescriptionboolean
A convenience method equivalent tothis == CLIENTBOUND
.boolean
A convenience method equivalent tothis == SERVERBOUND
.static MessageDirection
Returns the enum constant of this class with the specified name.static MessageDirection[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLIENTBOUND
A message sent from server to the client. -
SERVERBOUND
A message sent from the client to the server.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
isClientbound
public boolean isClientbound()A convenience method equivalent tothis == CLIENTBOUND
.- Returns:
- true if the direction is client bound
-
isServerbound
public boolean isServerbound()A convenience method equivalent tothis == SERVERBOUND
.- Returns:
- true if the direction is server bound
-