public enum ConnectionSide extends java.lang.Enum<ConnectionSide>
Enum Constant and Description |
---|
BOTH
Listen for both client and server side packets.
|
CLIENT_SIDE
Listen for client side packets that will invoke onPacketReceiving().
|
SERVER_SIDE
Listen for server side packets that will invoke onPacketSending().
|
Modifier and Type | Method and Description |
---|---|
boolean |
isForClient() |
boolean |
isForServer() |
static ConnectionSide |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionSide[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionSide SERVER_SIDE
public static final ConnectionSide CLIENT_SIDE
public static final ConnectionSide BOTH
public static ConnectionSide[] values()
for (ConnectionSide c : ConnectionSide.values()) System.out.println(c);
public static ConnectionSide 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 nullpublic boolean isForClient()
public boolean isForServer()