Enum Class GameMode
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<GameMode>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdventure mode: like survival but cannot break/place blocks without proper tools.Creative mode: unlimited resources, instant block breaking, flying, invulnerability.Spectator mode: invisible, can fly through blocks, cannot interact with the world.Survival mode: resource gathering, health/hunger management, mob combat.Unknown or not yet determined game mode. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAdventure mode: like survival but cannot break/place blocks without proper tools.static final intCreative mode: unlimited resources, instant block breaking, flying, invulnerability.static final intSpectator mode: invisible, can fly through blocks, cannot interact with the world.static final intSurvival mode: resource gathering, health/hunger management, mob combat.static final intUnknown or not yet determined game mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic GameModeforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<GameMode> static GameModevalueOf(int value) Deprecated.static GameModevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this class with the specified name.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
-
GAME_MODE_UNSPECIFIED
Unknown or not yet determined game mode.
GAME_MODE_UNSPECIFIED = 0; -
GAME_MODE_SURVIVAL
Survival mode: resource gathering, health/hunger management, mob combat.
GAME_MODE_SURVIVAL = 1; -
GAME_MODE_CREATIVE
Creative mode: unlimited resources, instant block breaking, flying, invulnerability.
GAME_MODE_CREATIVE = 2; -
GAME_MODE_ADVENTURE
Adventure mode: like survival but cannot break/place blocks without proper tools.
GAME_MODE_ADVENTURE = 3; -
GAME_MODE_SPECTATOR
Spectator mode: invisible, can fly through blocks, cannot interact with the world.
GAME_MODE_SPECTATOR = 4; -
UNRECOGNIZED
-
-
Field Details
-
GAME_MODE_UNSPECIFIED_VALUE
public static final int GAME_MODE_UNSPECIFIED_VALUEUnknown or not yet determined game mode.
GAME_MODE_UNSPECIFIED = 0;- See Also:
-
GAME_MODE_SURVIVAL_VALUE
public static final int GAME_MODE_SURVIVAL_VALUESurvival mode: resource gathering, health/hunger management, mob combat.
GAME_MODE_SURVIVAL = 1;- See Also:
-
GAME_MODE_CREATIVE_VALUE
public static final int GAME_MODE_CREATIVE_VALUECreative mode: unlimited resources, instant block breaking, flying, invulnerability.
GAME_MODE_CREATIVE = 2;- See Also:
-
GAME_MODE_ADVENTURE_VALUE
public static final int GAME_MODE_ADVENTURE_VALUEAdventure mode: like survival but cannot break/place blocks without proper tools.
GAME_MODE_ADVENTURE = 3;- See Also:
-
GAME_MODE_SPECTATOR_VALUE
public static final int GAME_MODE_SPECTATOR_VALUESpectator mode: invisible, can fly through blocks, cannot interact with the world.
GAME_MODE_SPECTATOR = 4;- See Also:
-
-
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.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:
value- 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
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
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:
desc- 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
-