# Uses of Class
org.bukkit.GameRule

Packages that use GameRule
Package
Description
io.papermc.paper.event.world
org.bukkit
The root package of the Bukkit API, contains generalized API classes.

## Uses of GameRule in io.papermc.paper.event.world

Methods in io.papermc.paper.event.world that return GameRule
Modifier and Type
Method
Description
`@NotNull GameRule<?>`
WorldGameRuleChangeEvent.`getGameRule()`
Gets the game rule associated with this event.
Constructors in io.papermc.paper.event.world with parameters of type GameRule
Modifier
Constructor
Description
``
`WorldGameRuleChangeEvent(@NotNull World world, @Nullable CommandSender commandSender, @NotNull GameRule<?> gameRule, @NotNull String value)`

## Uses of GameRule in org.bukkit

Fields in org.bukkit declared as GameRule
Modifier and Type
Field
Description
`static final GameRule<Boolean>`
GameRule.`ANNOUNCE_ADVANCEMENTS`
Toggles the announcing of advancements.
`static final GameRule<Boolean>`
GameRule.`BLOCK_EXPLOSION_DROP_DECAY`
Whether block explosions will destroy dropped items.
`static final GameRule<Boolean>`
GameRule.`COMMAND_BLOCK_OUTPUT`
Whether command blocks should notify admins when they perform commands.
`static final GameRule<Boolean>`
GameRule.`DISABLE_ELYTRA_MOVEMENT_CHECK`
Whether the server should skip checking player speed when the player is wearing elytra.
`static final GameRule<Boolean>`
GameRule.`DISABLE_RAIDS`
Whether pillager raids are enabled or not.
`static final GameRule<Boolean>`
GameRule.`DO_DAYLIGHT_CYCLE`
Whether time progresses from the current moment.
`static final GameRule<Boolean>`
GameRule.`DO_ENTITY_DROPS`
Whether entities that are not mobs should have drops.
`static final GameRule<Boolean>`
GameRule.`DO_FIRE_TICK`
Whether fire should spread and naturally extinguish.
`static final GameRule<Boolean>`
GameRule.`DO_IMMEDIATE_RESPAWN`
Whether clients will respawn immediately after death or not.
`static final GameRule<Boolean>`
GameRule.`DO_INSOMNIA`
Whether phantoms will appear without sleeping or not.
`static final GameRule<Boolean>`
GameRule.`DO_LIMITED_CRAFTING`
Whether players should only be able to craft recipes they've unlocked first.
`static final GameRule<Boolean>`
GameRule.`DO_MOB_LOOT`
Whether mobs should drop items.
`static final GameRule<Boolean>`
GameRule.`DO_MOB_SPAWNING`
Whether mobs should naturally spawn.
`static final GameRule<Boolean>`
GameRule.`DO_PATROL_SPAWNING`
Whether patrols should naturally spawn.
`static final GameRule<Boolean>`
GameRule.`DO_TILE_DROPS`
Whether blocks should have drops.
`static final GameRule<Boolean>`
GameRule.`DO_TRADER_SPAWNING`
Whether traders should naturally spawn.
`static final GameRule<Boolean>`
GameRule.`DO_WARDEN_SPAWNING`
Whether wardens should naturally spawn.
`static final GameRule<Boolean>`
GameRule.`DO_WEATHER_CYCLE`
Whether the weather will change from the current moment.
`static final GameRule<Boolean>`
GameRule.`DROWNING_DAMAGE`
Whether drowning damage is enabled or not.
`static final GameRule<Boolean>`
GameRule.`FALL_DAMAGE`
Whether fall damage is enabled or not.
`static final GameRule<Boolean>`
GameRule.`FIRE_DAMAGE`
Whether fire damage is enabled or not.
`static final GameRule<Boolean>`
GameRule.`FORGIVE_DEAD_PLAYERS`
Whether mobs should cease being angry at a player once they die.
`static final GameRule<Boolean>`
GameRule.`FREEZE_DAMAGE`
Whether freeze damage is enabled or not.
`static final GameRule<Boolean>`
GameRule.`GLOBAL_SOUND_EVENTS`
Whether global level events such as ender dragon, wither, and completed end portal effects will propagate across the entire server.
`static final GameRule<Boolean>`
GameRule.`KEEP_INVENTORY`
Whether the player should keep items in their inventory after death.
`static final GameRule<Boolean>`
GameRule.`LAVA_SOURCE_CONVERSION`
Whether lava blocks can convert into lava source blocks.
`static final GameRule<Boolean>`
GameRule.`LOG_ADMIN_COMMANDS`
Whether to log admin commands to server log.
`static final GameRule<Integer>`
GameRule.`MAX_COMMAND_CHAIN_LENGTH`
Determines 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.
`static final GameRule<Integer>`
GameRule.`MAX_ENTITY_CRAMMING`
The maximum number of other pushable entities a mob or player can push, before taking suffocation damage.
`static final GameRule<Boolean>`
GameRule.`MOB_EXPLOSION_DROP_DECAY`
* Whether mob explosions will destroy dropped items.
`static final GameRule<Boolean>`
GameRule.`MOB_GRIEFING`
Whether mobs can pick up items or change blocks.
`static final GameRule<Boolean>`
GameRule.`NATURAL_REGENERATION`
Whether players can regenerate health naturally through their hunger bar.
`static final GameRule<Integer>`
GameRule.`PLAYERS_SLEEPING_PERCENTAGE`
The percentage of online players which must be sleeping for the night to advance.
`static final GameRule<Integer>`
GameRule.`RANDOM_TICK_SPEED`
How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick.
`static final GameRule<Boolean>`
GameRule.`REDUCED_DEBUG_INFO`
Whether the debug screen shows all or reduced information.
`static final GameRule<Boolean>`
GameRule.`SEND_COMMAND_FEEDBACK`
Whether the feedback from commands executed by a player should show up in chat.
`static final GameRule<Boolean>`
GameRule.`SHOW_DEATH_MESSAGES`
Whether a message appears in chat when a player dies.
`static final GameRule<Integer>`
GameRule.`SNOW_ACCUMULATION_HEIGHT`
`static final GameRule<Integer>`
GameRule.`SPAWN_RADIUS`
The 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.
`static final GameRule<Boolean>`
GameRule.`SPECTATORS_GENERATE_CHUNKS`
Whether players in spectator mode can generate chunks.
`static final GameRule<Boolean>`
GameRule.`TNT_EXPLOSION_DROP_DECAY`
Whether tnt explosions will destroy dropped items.
`static final GameRule<Boolean>`
GameRule.`UNIVERSAL_ANGER`
Whether mobs will target all player entities once angered.
`static final GameRule<Boolean>`
GameRule.`WATER_SOURCE_CONVERSION`
Whether water blocks can convert into water source blocks.
Methods in org.bukkit that return GameRule
Modifier and Type
Method
Description
`static @Nullable GameRule<?>`
GameRule.`getByName(@NotNull String rule)`
Get a `GameRule` by its name.
`static @NotNull GameRule<?>[]`
GameRule.`values()`
Get an immutable collection of `GameRule`s.
Methods in org.bukkit with parameters of type GameRule
Modifier and Type
Method
Description
`<T> T`
World.`getGameRuleDefault(@NotNull GameRule<T> rule)`
Get the default value for a given `GameRule`.
`<T> T`
World.`getGameRuleValue(@NotNull GameRule<T> rule)`
Get the current value for a given `GameRule`.
`<T> boolean`
World.`setGameRule(@NotNull GameRule<T> rule, T newValue)`
Set the given `GameRule`'s new value.