public static enum WorldSettings.GameType extends java.lang.Enum<WorldSettings.GameType>
Enum Constant and Description |
---|
ADVENTURE |
CREATIVE |
NOT_SET |
SURVIVAL |
Modifier and Type | Method and Description |
---|---|
void |
configurePlayerCapabilities(PlayerCapabilities par1PlayerCapabilities)
Configures the player capabilities based on the game type
|
static WorldSettings.GameType |
getByID(int par0)
Returns the game type with the specified ID, or SURVIVAL if none found.
|
static WorldSettings.GameType |
getByName(java.lang.String par0Str)
Returns the game type with the specified name, or SURVIVAL if none found.
|
int |
getID()
Returns the ID of this game type
|
java.lang.String |
getName()
Returns the name of this game type
|
boolean |
isAdventure()
Returns true if this is the ADVENTURE game type
|
boolean |
isCreative()
Returns true if this is the CREATIVE game type
|
boolean |
isSurvivalOrAdventure()
Returns true if this is the SURVIVAL or ADVENTURE game type
|
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 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 par1PlayerCapabilities)
public boolean isAdventure()
public boolean isCreative()
public boolean isSurvivalOrAdventure()
public static WorldSettings.GameType getByID(int par0)
public static WorldSettings.GameType getByName(java.lang.String par0Str)