Package net.minecraft.world
Enum WorldSettings.GameType
- java.lang.Object
-
- java.lang.Enum<WorldSettings.GameType>
-
- net.minecraft.world.WorldSettings.GameType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WorldSettings.GameType>
- Enclosing class:
- WorldSettings
public static enum WorldSettings.GameType extends java.lang.Enum<WorldSettings.GameType>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configurePlayerCapabilities(PlayerCapabilities capabilities)
static WorldSettings.GameType
getByID(int idIn)
static WorldSettings.GameType
getByName(java.lang.String parString1)
int
getID()
java.lang.String
getName()
boolean
isAdventure()
boolean
isCreative()
boolean
isSurvivalOrAdventure()
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.
-
-
-
Enum Constant Detail
-
NOT_SET
public static final WorldSettings.GameType NOT_SET
-
SURVIVAL
public static final WorldSettings.GameType SURVIVAL
-
CREATIVE
public static final WorldSettings.GameType CREATIVE
-
ADVENTURE
public static final WorldSettings.GameType ADVENTURE
-
SPECTATOR
public static final WorldSettings.GameType SPECTATOR
-
-
Method Detail
-
values
public static WorldSettings.GameType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WorldSettings.GameType c : WorldSettings.GameType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WorldSettings.GameType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getID
public int getID()
-
getName
public java.lang.String getName()
-
configurePlayerCapabilities
public void configurePlayerCapabilities(PlayerCapabilities capabilities)
-
isAdventure
public boolean isAdventure()
-
isCreative
public boolean isCreative()
-
isSurvivalOrAdventure
public boolean isSurvivalOrAdventure()
-
getByID
public static WorldSettings.GameType getByID(int idIn)
-
getByName
public static WorldSettings.GameType getByName(java.lang.String parString1)
-
-