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 |
|---|---|
static ConnectionSide |
add(ConnectionSide a,
ConnectionSide b)
If both connection sides are present, return
BOTH - otherwise, return the one valud connection side. |
PacketType.Sender |
getSender()
Retrieve the sender of this connection side.
|
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()
public PacketType.Sender getSender()
This is NULL for BOTH.
public static ConnectionSide add(ConnectionSide a, ConnectionSide b)
BOTH - otherwise, return the one valud connection side.
NULL is not a valid connection side.
a - - the first connection side.b - - the second connection side.