Enum Constant and Description |
---|
ADVENTURE |
CREATIVE |
NOT_SET |
SPECTATOR |
SURVIVAL |
Modifier and Type | Method and Description |
---|---|
void |
configurePlayerCapabilities(PlayerCapabilities capabilities) |
static GameType |
getByID(int idIn) |
static GameType |
getByName(java.lang.String gamemodeName) |
int |
getID() |
java.lang.String |
getName() |
boolean |
hasLimitedInteractions() |
boolean |
isCreative() |
boolean |
isSurvivalOrAdventure() |
static GameType |
parseGameTypeWithDefault(int targetId,
GameType fallback) |
static GameType |
parseGameTypeWithDefault(java.lang.String targetName,
GameType fallback) |
static GameType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GameType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GameType NOT_SET
public static final GameType SURVIVAL
public static final GameType CREATIVE
public static final GameType ADVENTURE
public static final GameType SPECTATOR
public static GameType[] values()
for (GameType c : GameType.values()) System.out.println(c);
public static GameType 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 int getID()
public java.lang.String getName()
public void configurePlayerCapabilities(PlayerCapabilities capabilities)
public boolean hasLimitedInteractions()
public boolean isCreative()
public boolean isSurvivalOrAdventure()
public static GameType getByID(int idIn)
public static GameType parseGameTypeWithDefault(int targetId, GameType fallback)
public static GameType getByName(java.lang.String gamemodeName)