public enum EnumConnectionState extends java.lang.Enum<EnumConnectionState>
Enum Constant and Description |
---|
HANDSHAKING |
LOGIN |
PLAY |
STATUS |
Modifier and Type | Method and Description |
---|---|
static EnumConnectionState |
getById(int stateId) |
static EnumConnectionState |
getFromPacket(Packet<?> packetIn) |
int |
getId() |
Packet<?> |
getPacket(EnumPacketDirection direction,
int packetId) |
java.lang.Integer |
getPacketId(EnumPacketDirection direction,
Packet<?> packetIn) |
protected EnumConnectionState |
registerPacket(EnumPacketDirection direction,
java.lang.Class<? extends Packet<?>> packetClass) |
static EnumConnectionState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EnumConnectionState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumConnectionState HANDSHAKING
public static final EnumConnectionState PLAY
public static final EnumConnectionState STATUS
public static final EnumConnectionState LOGIN
public static EnumConnectionState[] values()
for (EnumConnectionState c : EnumConnectionState.values()) System.out.println(c);
public static EnumConnectionState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprotected EnumConnectionState registerPacket(EnumPacketDirection direction, java.lang.Class<? extends Packet<?>> packetClass)
public java.lang.Integer getPacketId(EnumPacketDirection direction, Packet<?> packetIn) throws java.lang.Exception
java.lang.Exception
@Nullable public Packet<?> getPacket(EnumPacketDirection direction, int packetId) throws java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.IllegalAccessException
public int getId()
public static EnumConnectionState getById(int stateId)
public static EnumConnectionState getFromPacket(Packet<?> packetIn)