Package net.minecraft.src
Enum Class EnumGameType
- All Implemented Interfaces:
Serializable,Comparable<EnumGameType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigurePlayerCapabilities(PlayerCapabilities par1PlayerCapabilities) Configures the player capabilities based on the game typestatic EnumGameTypegetByID(int par0) Returns the game type with the specified ID, or SURVIVAL if none found.static EnumGameTypeReturns the game type with the specified name, or SURVIVAL if none found.intgetID()Returns the ID of this game typegetName()Returns the name of this game typebooleanReturns true if this is the ADVENTURE game typebooleanReturns true if this is the CREATIVE game typebooleanReturns true if this is the SURVIVAL or ADVENTURE game typestatic EnumGameTypeReturns the enum constant of this class with the specified name.static EnumGameType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_SET
-
SURVIVAL
-
CREATIVE
-
ADVENTURE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getID
public int getID()Returns the ID of this game type -
getName
Returns the name of this game type -
configurePlayerCapabilities
Configures the player capabilities based on the game type -
isAdventure
public boolean isAdventure()Returns true if this is the ADVENTURE game type -
isCreative
public boolean isCreative()Returns true if this is the CREATIVE game type -
isSurvivalOrAdventure
public boolean isSurvivalOrAdventure()Returns true if this is the SURVIVAL or ADVENTURE game type -
getByID
Returns the game type with the specified ID, or SURVIVAL if none found. Args: id -
getByName
Returns the game type with the specified name, or SURVIVAL if none found. This is case sensitive. Args: name
-