Enum Class PacketType.Protocol

java.lang.Object
java.lang.Enum<PacketType.Protocol>
com.comphenix.protocol.PacketType.Protocol
All Implemented Interfaces:
Serializable, Comparable<PacketType.Protocol>, Constable
Enclosing class:
PacketType

public static enum PacketType.Protocol extends Enum<PacketType.Protocol>
Represents the different protocol or connection states.
  • Enum Constant Details

  • Method Details

    • values

      public static PacketType.Protocol[] 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 PacketType.Protocol 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
    • fromVanilla

      public static PacketType.Protocol fromVanilla(Enum<?> vanilla)
      Retrieve the correct protocol enum from a given vanilla enum instance.
      Parameters:
      vanilla - - the vanilla protocol enum instance.
      Returns:
      The corresponding protocol.
    • getPacketName

      public String getPacketName()
    • getMojangName

      public String getMojangName()
    • getMcpPacketName

      public String getMcpPacketName()