public static enum PacketType.Handshake extends Enum<PacketType.Handshake> implements PacketType
PacketType.Client, PacketType.Handshake, PacketType.Login, PacketType.Server, PacketType.Status
Enum Constant and Description |
---|
IN_LISTENER |
IS_SET_PROTOCOL |
UNSET |
CLIENT_PREFIX, HANDSHAKE_PREFIX, LOGIN_PREFIX, SERVER_PREFIX, STATUS_PREFIX
Modifier and Type | Method and Description |
---|---|
NPacket |
createNewPacket()
Create a new packet of the current type
|
List<String> |
getAlias()
Get all alias of the packet
|
PacketDirection |
getDirection()
Get the packet direction
|
String |
getFullName()
Get the full packet name with prefix
|
String |
getPacketName()
Get a showable packet name
|
boolean |
isFlyingPacket()
Check if it's flying packet
|
boolean |
isUnset()
Check if the current type correspond to an unset type.
|
static PacketType.Handshake |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PacketType.Handshake[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getPacketTypeFor, getType, name
public static final PacketType.Handshake IN_LISTENER
public static final PacketType.Handshake IS_SET_PROTOCOL
public static final PacketType.Handshake UNSET
public static PacketType.Handshake[] values()
for (PacketType.Handshake c : PacketType.Handshake.values()) System.out.println(c);
values
in interface PacketType
public static PacketType.Handshake valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getPacketName()
PacketType
getPacketName
in interface PacketType
public String getFullName()
PacketType
getFullName
in interface PacketType
public List<String> getAlias()
PacketType
getAlias
in interface PacketType
public boolean isFlyingPacket()
PacketType
isFlyingPacket
in interface PacketType
public boolean isUnset()
PacketType
isUnset
in interface PacketType
public NPacket createNewPacket()
PacketType
createNewPacket
in interface PacketType
public PacketDirection getDirection()
PacketType
getDirection
in interface PacketType