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