Enum Constant and Description |
---|
BOTH
Listen for every sent and received packet.
|
LOGIN
Only listen for packets sent or received before a player has logged in.
|
PLAYING
Only listen for packets sent or received after a player has logged in.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasLogin()
Determine if the current value represents the login phase.
|
boolean |
hasPlaying()
Determine if the current value represents the playing phase.
|
static GamePhase |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GamePhase[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GamePhase LOGIN
public static final GamePhase PLAYING
public static final GamePhase BOTH
public static GamePhase[] values()
for (GamePhase c : GamePhase.values()) System.out.println(c);
public static GamePhase 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 hasLogin()
public boolean hasPlaying()