Package org.geysermc.geyser.level
Enum Class GameRule
- All Implemented Interfaces:
Serializable
,Comparable<GameRule>
,Constable
This enum stores each gamerule along with the value type and the default.
It is used to construct the list for the settings menu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertValue(String value)
Convert a string to an object of the correct type for the current gamerulestatic GameRule
fromJavaID(String id)
Fetch a game rule by the given Java IDClass<?>
getType()
static GameRule
Returns the enum constant of this class with the specified name.static GameRule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ANNOUNCEADVANCEMENTS
-
COMMANDBLOCKOUTPUT
-
DISABLEELYTRAMOVEMENTCHECK
-
DISABLERAIDS
-
DODAYLIGHTCYCLE
-
DOENTITYDROPS
-
DOFIRETICK
-
DOIMMEDIATERESPAWN
-
DOINSOMNIA
-
DOLIMITEDCRAFTING
-
DOMOBLOOT
-
DOMOBSPAWNING
-
DOPATROLSPAWNING
-
DOTILEDROPS
-
DOTRADERSPAWNING
-
DOWEATHERCYCLE
-
DROWNINGDAMAGE
-
FALLDAMAGE
-
FIREDAMAGE
-
FREEZEDAMAGE
-
FORGIVEDEADPLAYERS
-
KEEPINVENTORY
-
LOGADMINCOMMANDS
-
MAXCOMMANDCHAINLENGTH
-
MAXENTITYCRAMMING
-
MOBGRIEFING
-
NATURALREGENERATION
-
PLAYERSSLEEPINGPERCENTAGE
-
RANDOMTICKSPEED
-
REDUCEDDEBUGINFO
-
SENDCOMMANDFEEDBACK
-
SHOWDEATHMESSAGES
-
SPAWNRADIUS
-
SPECTATORSGENERATECHUNKS
-
UNIVERSALANGER
-
UNKNOWN
-
-
Field Details
-
VALUES
-
-
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
-
convertValue
Convert a string to an object of the correct type for the current gamerule- Parameters:
value
- The string value to convert- Returns:
- The converted and formatted value
-
fromJavaID
Fetch a game rule by the given Java ID -
getJavaID
-
getType
-
getDefaultValue
-