Package org.bukkit
Enum Class GameMode
- All Implemented Interfaces:
- Serializable,- Comparable<GameMode>,- Constable,- Translatable
Represents the various type of game modes that 
HumanEntitys may
 have- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionAdventure mode cannot break blocks without the correct tools.Creative mode may fly, build instantly, become invulnerable and create free items.Spectator mode cannot interact with the world in anyway and is invisible to normal players.Survival mode is the "normal" gameplay type, with no special features.
- 
Method SummaryModifier and TypeMethodDescriptiongetByValue(int value) Deprecated.Magic valueintgetValue()Deprecated.Magic valueGets the translation key.static GameModeReturns the enum constant of this class with the specified name.static GameMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
CREATIVECreative mode may fly, build instantly, become invulnerable and create free items.
- 
SURVIVALSurvival mode is the "normal" gameplay type, with no special features.
- 
ADVENTUREAdventure mode cannot break blocks without the correct tools.
- 
SPECTATORSpectator mode cannot interact with the world in anyway and is invisible to normal players. This grants the player the ability to no-clip through the world.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
translationKeyDescription copied from interface:net.kyori.adventure.translation.TranslatableGets the translation key.- Specified by:
- translationKeyin interface- Translatable
- Returns:
- the translation key
 
- 
getValueDeprecated.Magic valueGets the mode value associated with this GameMode- Returns:
- An integer value of this gamemode
 
- 
getByValueDeprecated.Magic valueGets the GameMode represented by the specified value- Parameters:
- value- Value to check
- Returns:
- Associative GameModewith the given value, or null if it doesn't exist
 
 
-