public enum EnumGameType extends Enum<EnumGameType>
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 EnumGameType |
getByID(int par0)
Returns the game type with the specified ID, or SURVIVAL if none found.
|
static EnumGameType |
getByName(String par0Str) |
int |
getID()
Returns the ID of this game type
|
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() |
static EnumGameType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnumGameType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumGameType NOT_SET
public static final EnumGameType SURVIVAL
public static final EnumGameType CREATIVE
public static final EnumGameType ADVENTURE
public static EnumGameType[] values()
for (EnumGameType c : EnumGameType.values()) System.out.println(c);
public static EnumGameType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic int getID()
public void configurePlayerCapabilities(PlayerCapabilities par1PlayerCapabilities)
public boolean isAdventure()
public boolean isCreative()
public boolean isSurvivalOrAdventure()
public static EnumGameType getByID(int par0)
public static EnumGameType getByName(String par0Str)