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)
Configures the player capabilities based on the game type
|
static WorldSettings.GameType |
getByID(int idIn)
Returns the game type with the specified ID, or SURVIVAL if none found.
|
static WorldSettings.GameType |
getByName(java.lang.String p_77142_0_)
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 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 getByName(java.lang.String p_77142_0_)