Enum Class MessageDirection

java.lang.Object
java.lang.Enum<MessageDirection>
wtf.choco.veinminer.network.MessageDirection
All Implemented Interfaces:
Serializable, Comparable<MessageDirection>, Constable

public enum MessageDirection extends Enum<MessageDirection>
A direction in which a PluginMessage may be sent over the protocol.
  • Enum Constant Details

    • CLIENTBOUND

      public static final MessageDirection CLIENTBOUND
      A message sent from server to the client.
    • SERVERBOUND

      public static final MessageDirection SERVERBOUND
      A message sent from the client to the server.
  • Method Details

    • values

      public static MessageDirection[] 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

      public static MessageDirection valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isClientbound

      public boolean isClientbound()
      A convenience method equivalent to this == CLIENTBOUND.
      Returns:
      true if the direction is client bound
    • isServerbound

      public boolean isServerbound()
      A convenience method equivalent to this == SERVERBOUND.
      Returns:
      true if the direction is server bound