Package org.bukkit
Class GameRule<T>
java.lang.Object
org.bukkit.GameRule<T>
- Type Parameters:
T- type of rule (Boolean or Integer)
- All Implemented Interfaces:
FeatureDependant,Keyed,Translatable,Keyed
@NonExtendable
public abstract class GameRule<T>
extends Object
implements Translatable, FeatureDependant, Keyed
GameRules dictate certain behavior within Minecraft itself
For more information please visit the Minecraft Wiki
For more information please visit the Minecraft Wiki
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SHOW_ADVANCEMENT_MESSAGESDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.BLOCK_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.COMMAND_BLOCK_OUTPUTDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.COMMAND_BLOCKS_WORKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_BLOCK_MODIFICATIONSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ELYTRA_MOVEMENT_CHECK(inverted)Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PLAYER_MOVEMENT_CHECK(inverted)Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RAIDS(inverted)Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ADVANCE_TIMEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ENTITY_DROPSDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.IMMEDIATE_RESPAWNDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_PHANTOMSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LIMITED_CRAFTINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_DROPSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_MOBSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_PATROLSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.BLOCK_DROPSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_WANDERING_TRADERSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPREAD_VINESDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_WARDENSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ADVANCE_WEATHERDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.DROWNING_DAMAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ENDER_PEARLS_VANISH_ON_DEATHDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FALL_DAMAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FIRE_DAMAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FORGIVE_DEAD_PLAYERSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FREEZE_DAMAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.GLOBAL_SOUND_EVENTSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.KEEP_INVENTORYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LAVA_SOURCE_CONVERSIONDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LOCATOR_BARDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LOG_ADMIN_COMMANDSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_COMMAND_SEQUENCE_LENGTHDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_COMMAND_FORKSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_ENTITY_CRAMMINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_MINECART_SPEEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_GRIEFINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.NATURAL_HEALTH_REGENERATIONDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PLAYERS_SLEEPING_PERCENTAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PROJECTILES_CAN_BREAK_BLOCKSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PVPDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RANDOM_TICK_SPEEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.REDUCED_DEBUG_INFODeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SEND_COMMAND_FEEDBACKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SHOW_DEATH_MESSAGESDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_SNOW_ACCUMULATION_HEIGHTDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_MONSTERSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RESPAWN_RADIUSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWNER_BLOCKS_WORKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPECTATORS_GENERATE_CHUNKSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.TNT_EXPLODESDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.TNT_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.UNIVERSAL_ANGERDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.WATER_SOURCE_CONVERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, fetch element from itgetName()Deprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, useKeyed.getKey()insteadgetType()Get the type of this rule.Gets the translation key.values()Deprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, fetch elements from itMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.papermc.paper.world.flag.FeatureDependant
requiredFeatures
-
Field Details
-
ANNOUNCE_ADVANCEMENTS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> ANNOUNCE_ADVANCEMENTSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SHOW_ADVANCEMENT_MESSAGESToggles the announcing of advancements. -
COMMAND_BLOCK_OUTPUT
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> COMMAND_BLOCK_OUTPUTDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.COMMAND_BLOCK_OUTPUTWhether command blocks should notify admins when they perform commands. -
DISABLE_PLAYER_MOVEMENT_CHECK
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DISABLE_PLAYER_MOVEMENT_CHECKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PLAYER_MOVEMENT_CHECK(inverted)Whether the server should skip checking player speed. -
DISABLE_ELYTRA_MOVEMENT_CHECK
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DISABLE_ELYTRA_MOVEMENT_CHECKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ELYTRA_MOVEMENT_CHECK(inverted)Whether the server should skip checking player speed when the player is wearing elytra. -
DO_DAYLIGHT_CYCLE
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_DAYLIGHT_CYCLEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ADVANCE_TIMEWhether time progresses from the current moment. -
DO_ENTITY_DROPS
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ENTITY_DROPSWhether entities that are not mobs should have drops. -
DO_FIRE_TICK
Deprecated, for removal: This API element is subject to removal in a future version.Whether fire should spread and naturally extinguish. -
DO_LIMITED_CRAFTING
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_LIMITED_CRAFTINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LIMITED_CRAFTINGWhether players should only be able to craft recipes they've unlocked first. -
PROJECTILES_CAN_BREAK_BLOCKS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PROJECTILES_CAN_BREAK_BLOCKSWhether projectiles can break blocks. -
DO_MOB_LOOT
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_DROPSWhether mobs should drop items. -
DO_MOB_SPAWNING
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_MOBSWhether mobs should naturally spawn. -
DO_TILE_DROPS
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.BLOCK_DROPSWhether blocks should have drops. -
DO_WEATHER_CYCLE
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_WEATHER_CYCLEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ADVANCE_WEATHERWhether the weather will change from the current moment. -
KEEP_INVENTORY
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.KEEP_INVENTORYWhether the player should keep items in their inventory after death. -
LOG_ADMIN_COMMANDS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> LOG_ADMIN_COMMANDSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LOG_ADMIN_COMMANDSWhether to log admin commands to server log. -
MOB_GRIEFING
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_GRIEFINGWhether mobs can pick up items or change blocks. -
NATURAL_REGENERATION
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> NATURAL_REGENERATIONDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.NATURAL_HEALTH_REGENERATIONWhether players can regenerate health naturally through their hunger bar. -
REDUCED_DEBUG_INFO
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> REDUCED_DEBUG_INFODeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.REDUCED_DEBUG_INFOWhether the debug screen shows all or reduced information. -
SEND_COMMAND_FEEDBACK
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> SEND_COMMAND_FEEDBACKDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SEND_COMMAND_FEEDBACKWhether the feedback from commands executed by a player should show up in chat. Also affects the default behavior of whether command blocks store their output text. -
SHOW_DEATH_MESSAGES
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> SHOW_DEATH_MESSAGESDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SHOW_DEATH_MESSAGESWhether a message appears in chat when a player dies. -
SPECTATORS_GENERATE_CHUNKS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPECTATORS_GENERATE_CHUNKSWhether players in spectator mode can generate chunks. -
DISABLE_RAIDS
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RAIDS(inverted)Whether pillager raids are enabled or not. -
DO_INSOMNIA
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_PHANTOMSWhether phantoms will appear without sleeping or not. -
DO_IMMEDIATE_RESPAWN
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_IMMEDIATE_RESPAWNDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.IMMEDIATE_RESPAWNWhether clients will respawn immediately after death or not. -
DROWNING_DAMAGE
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.DROWNING_DAMAGEWhether drowning damage is enabled or not. -
FALL_DAMAGE
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FALL_DAMAGEWhether fall damage is enabled or not. -
FIRE_DAMAGE
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FIRE_DAMAGEWhether fire damage is enabled or not. -
FREEZE_DAMAGE
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FREEZE_DAMAGEWhether freeze damage is enabled or not. -
DO_PATROL_SPAWNING
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_PATROL_SPAWNINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_PATROLSWhether patrols should naturally spawn. -
DO_TRADER_SPAWNING
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_TRADER_SPAWNINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_WANDERING_TRADERSWhether traders should naturally spawn. -
DO_WARDEN_SPAWNING
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> DO_WARDEN_SPAWNINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_WARDENSWhether wardens should naturally spawn. -
FORGIVE_DEAD_PLAYERS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> FORGIVE_DEAD_PLAYERSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.FORGIVE_DEAD_PLAYERSWhether mobs should cease being angry at a player once they die. -
UNIVERSAL_ANGER
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.UNIVERSAL_ANGERWhether mobs will target all player entities once angered. -
BLOCK_EXPLOSION_DROP_DECAY
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.BLOCK_EXPLOSION_DROP_DECAYWhether block explosions will destroy dropped items. -
MOB_EXPLOSION_DROP_DECAY
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MOB_EXPLOSION_DROP_DECAY* Whether mob explosions will destroy dropped items. -
TNT_EXPLOSION_DROP_DECAY
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAYDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.TNT_EXPLOSION_DROP_DECAYWhether tnt explosions will destroy dropped items. -
WATER_SOURCE_CONVERSION
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> WATER_SOURCE_CONVERSIONDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.WATER_SOURCE_CONVERSIONWhether water blocks can convert into water source blocks. -
LAVA_SOURCE_CONVERSION
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> LAVA_SOURCE_CONVERSIONDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LAVA_SOURCE_CONVERSIONWhether lava blocks can convert into lava source blocks. -
GLOBAL_SOUND_EVENTS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> GLOBAL_SOUND_EVENTSDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.GLOBAL_SOUND_EVENTSWhether global level events such as ender dragon, wither, and completed end portal effects will propagate across the entire server. -
DO_VINES_SPREAD
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPREAD_VINESWhether vines will spread. -
ENDER_PEARLS_VANISH_ON_DEATH
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATHDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.ENDER_PEARLS_VANISH_ON_DEATHWhether ender pearls will vanish on player death. -
ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYERDeprecated, for removal: This API element is subject to removal in a future version.Whether fire will still propagate far away from players (8 chunks). -
TNT_EXPLODES
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.TNT_EXPLODESWhether primed tnt explodes. -
LOCATOR_BAR
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.LOCATOR_BARConfigures if the world uses the locator bar. -
PVP
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PVPWhether player versus player combat is allowed. -
SPAWN_MONSTERS
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWN_MONSTERSWhether monsters should naturally spawn. -
ALLOW_ENTERING_NETHER_USING_PORTALS
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALSDeprecated, for removal: This API element is subject to removal in a future version.Whether players can enter the Nether using portals. -
COMMAND_BLOCKS_ENABLED
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> COMMAND_BLOCKS_ENABLEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.COMMAND_BLOCKS_WORKWhether command blocks are enabled. -
SPAWNER_BLOCKS_ENABLED
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Boolean> SPAWNER_BLOCKS_ENABLEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.SPAWNER_BLOCKS_WORKWhether spawner blocks are enabled. -
RANDOM_TICK_SPEED
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> RANDOM_TICK_SPEEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RANDOM_TICK_SPEEDHow often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 will disable random ticks, higher numbers will increase random ticks. -
SPAWN_RADIUS
Deprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.RESPAWN_RADIUSThe number of blocks outward from the world spawn coordinates that a player will spawn in when first joining a server or when dying without a spawnpoint. -
MAX_ENTITY_CRAMMING
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> MAX_ENTITY_CRAMMINGDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_ENTITY_CRAMMINGThe maximum number of other pushable entities a mob or player can push, before taking suffocation damage.
Setting to 0 disables this rule. -
MAX_COMMAND_CHAIN_LENGTH
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTHDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_COMMAND_SEQUENCE_LENGTHDetermines the number at which the chain of command blocks act as a "chain."
This is the maximum amount of command blocks that can be activated in a single tick from a single chain. -
MAX_COMMAND_FORK_COUNT
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> MAX_COMMAND_FORK_COUNTDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_COMMAND_FORKSDetermines the number of different commands/functions which execute commands can fork into. -
COMMAND_MODIFICATION_BLOCK_LIMIT
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> COMMAND_MODIFICATION_BLOCK_LIMITDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_BLOCK_MODIFICATIONSDetermines the maximum number of blocks which a command can modify. -
PLAYERS_SLEEPING_PERCENTAGE
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGEDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.PLAYERS_SLEEPING_PERCENTAGEThe percentage of online players which must be sleeping for the night to advance. -
SNOW_ACCUMULATION_HEIGHT
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHTDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_SNOW_ACCUMULATION_HEIGHT -
PLAYERS_NETHER_PORTAL_DEFAULT_DELAY
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAYDeprecated, for removal: This API element is subject to removal in a future version.The amount of time a player must stand in a nether portal before the portal activates. -
PLAYERS_NETHER_PORTAL_CREATIVE_DELAY
@Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAYDeprecated, for removal: This API element is subject to removal in a future version.The amount of time a player in creative mode must stand in a nether portal before the portal activates. -
MINECART_MAX_SPEED
@MinecraftExperimental(MINECART_IMPROVEMENTS) @Experimental @Deprecated(forRemoval=true, since="1.21.11") public static final GameRule<Integer> MINECART_MAX_SPEEDDeprecated, for removal: This API element is subject to removal in a future version.renamed toGameRules.MAX_MINECART_SPEEDThe maximum speed of minecarts (when the new movement algorithm is enabled).
-
-
Constructor Details
-
GameRule
public GameRule()
-
-
Method Details
-
getName
Deprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, useKeyed.getKey()insteadGet the name of this GameRule.- Returns:
- the name of this GameRule
-
getType
Get the type of this rule.- Returns:
- the rule type; Integer or Boolean
-
getByName
@Nullable @Deprecated(since="1.21.11", forRemoval=true) public static <T> @Nullable GameRule<T> getByName(@NotNull @NotNull String rule) Deprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, fetch element from itGet aGameRuleby its name.- Parameters:
rule- the name of the GameRule- Returns:
- the
GameRuleor null if no GameRule matches the given name
-
values
@NotNull @Deprecated(since="1.21.11", forRemoval=true) public static @NotNull GameRule<?>[] values()Deprecated, for removal: This API element is subject to removal in a future version.Game rule is now a registry, fetch elements from itGet an immutable collection ofGameRules.- Returns:
- an immutable collection containing all registered GameRules.
-
translationKey
Description copied from interface:net.kyori.adventure.translation.TranslatableGets the translation key.- Specified by:
translationKeyin interfaceTranslatable- Returns:
- the translation key
-
GameRules.ALLOW_ENTERING_NETHER_USING_PORTALS