Package org.bukkit
Class GameRule<T>
java.lang.Object
org.bukkit.GameRule<T>
- Type Parameters:
- T- type of rule (Boolean or Integer)
GameRules dictate certain behavior within Minecraft itself
 
For more information please visit the Minecraft Wiki
For more information please visit the Minecraft Wiki
- 
Field SummaryFieldsModifier and TypeFieldDescriptionToggles the announcing of advancements.Whether block explosions will destroy dropped items.Whether command blocks should notify admins when they perform commands.Determines the maximum number of blocks which a command can modify.Whether the server should skip checking player speed when the player is wearing elytra.Whether the server should skip checking player speed.Whether pillager raids are enabled or not.Whether time progresses from the current moment.Whether entities that are not mobs should have drops.Whether fire should spread and naturally extinguish.Whether clients will respawn immediately after death or not.Whether phantoms will appear without sleeping or not.Whether players should only be able to craft recipes they've unlocked first.Whether mobs should drop items.Whether mobs should naturally spawn.Whether patrols should naturally spawn.Whether blocks should have drops.Whether traders should naturally spawn.Whether vines will spread.Whether wardens should naturally spawn.Whether the weather will change from the current moment.Whether drowning damage is enabled or not.Whether ender pearls will vanish on player death.Whether fall damage is enabled or not.Whether fire damage is enabled or not.Whether mobs should cease being angry at a player once they die.Whether freeze damage is enabled or not.Whether global level events such as ender dragon, wither, and completed end portal effects will propagate across the entire server.Whether the player should keep items in their inventory after death.Whether lava blocks can convert into lava source blocks.Whether to log admin commands to server log.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.Determines the number of different commands/functions which execute commands can fork into.The maximum number of other pushable entities a mob or player can push, before taking suffocation damage.The maximum speed of minecarts (when the new movement algorithm is enabled).* Whether mob explosions will destroy dropped items.Whether mobs can pick up items or change blocks.Whether players can regenerate health naturally through their hunger bar.The amount of time a player in creative mode must stand in a nether portal before the portal activates.The amount of time a player must stand in a nether portal before the portal activates.The percentage of online players which must be sleeping for the night to advance.Whether projectiles can break blocks.How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick.Whether the debug screen shows all or reduced information.Whether the feedback from commands executed by a player should show up in chat.Whether a message appears in chat when a player dies.The number of chunks around spawn which will be kept loaded at all times.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.Whether players in spectator mode can generate chunks.Whether tnt explosions will destroy dropped items.Whether mobs will target all player entities once angered.Whether water blocks can convert into water source blocks.
- 
Method Summary
- 
Field Details- 
ANNOUNCE_ADVANCEMENTSToggles the announcing of advancements.
- 
COMMAND_BLOCK_OUTPUTWhether command blocks should notify admins when they perform commands.
- 
DISABLE_PLAYER_MOVEMENT_CHECKWhether the server should skip checking player speed.
- 
DISABLE_ELYTRA_MOVEMENT_CHECKWhether the server should skip checking player speed when the player is wearing elytra.
- 
DO_DAYLIGHT_CYCLEWhether time progresses from the current moment.
- 
DO_ENTITY_DROPSWhether entities that are not mobs should have drops.
- 
DO_FIRE_TICKWhether fire should spread and naturally extinguish.
- 
DO_LIMITED_CRAFTINGWhether players should only be able to craft recipes they've unlocked first.
- 
DO_MOB_LOOTWhether mobs should drop items.
- 
PROJECTILES_CAN_BREAK_BLOCKSWhether projectiles can break blocks.
- 
DO_MOB_SPAWNINGWhether mobs should naturally spawn.
- 
DO_TILE_DROPSWhether blocks should have drops.
- 
DO_WEATHER_CYCLEWhether the weather will change from the current moment.
- 
KEEP_INVENTORYWhether the player should keep items in their inventory after death.
- 
LOG_ADMIN_COMMANDSWhether to log admin commands to server log.
- 
MOB_GRIEFINGWhether mobs can pick up items or change blocks.
- 
NATURAL_REGENERATIONWhether players can regenerate health naturally through their hunger bar.
- 
REDUCED_DEBUG_INFOWhether the debug screen shows all or reduced information.
- 
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_MESSAGESWhether a message appears in chat when a player dies.
- 
SPECTATORS_GENERATE_CHUNKSWhether players in spectator mode can generate chunks.
- 
DISABLE_RAIDSWhether pillager raids are enabled or not.
- 
DO_INSOMNIAWhether phantoms will appear without sleeping or not.
- 
DO_IMMEDIATE_RESPAWNWhether clients will respawn immediately after death or not.
- 
DROWNING_DAMAGEWhether drowning damage is enabled or not.
- 
FALL_DAMAGEWhether fall damage is enabled or not.
- 
FIRE_DAMAGEWhether fire damage is enabled or not.
- 
FREEZE_DAMAGEWhether freeze damage is enabled or not.
- 
DO_PATROL_SPAWNINGWhether patrols should naturally spawn.
- 
DO_TRADER_SPAWNINGWhether traders should naturally spawn.
- 
DO_WARDEN_SPAWNINGWhether wardens should naturally spawn.
- 
FORGIVE_DEAD_PLAYERSWhether mobs should cease being angry at a player once they die.
- 
UNIVERSAL_ANGERWhether mobs will target all player entities once angered.
- 
BLOCK_EXPLOSION_DROP_DECAYWhether block explosions will destroy dropped items.
- 
MOB_EXPLOSION_DROP_DECAY* Whether mob explosions will destroy dropped items.
- 
TNT_EXPLOSION_DROP_DECAYWhether tnt explosions will destroy dropped items.
- 
WATER_SOURCE_CONVERSIONWhether water blocks can convert into water source blocks.
- 
LAVA_SOURCE_CONVERSIONWhether lava blocks can convert into lava source blocks.
- 
GLOBAL_SOUND_EVENTSWhether global level events such as ender dragon, wither, and completed end portal effects will propagate across the entire server.
- 
DO_VINES_SPREADWhether vines will spread.
- 
ENDER_PEARLS_VANISH_ON_DEATHWhether ender pearls will vanish on player death.
- 
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_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_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_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_COUNTDetermines the number of different commands/functions which execute commands can fork into.
- 
COMMAND_MODIFICATION_BLOCK_LIMITDetermines the maximum number of blocks which a command can modify.
- 
PLAYERS_SLEEPING_PERCENTAGEThe percentage of online players which must be sleeping for the night to advance.
- 
SNOW_ACCUMULATION_HEIGHT
- 
PLAYERS_NETHER_PORTAL_DEFAULT_DELAYThe amount of time a player must stand in a nether portal before the portal activates.
- 
PLAYERS_NETHER_PORTAL_CREATIVE_DELAYThe amount of time a player in creative mode must stand in a nether portal before the portal activates.
- 
MINECART_MAX_SPEEDThe maximum speed of minecarts (when the new movement algorithm is enabled).
- 
SPAWN_CHUNK_RADIUSThe number of chunks around spawn which will be kept loaded at all times.
 
- 
- 
Method Details- 
getNameGet the name of this GameRule.- Returns:
- the name of this GameRule
 
- 
getTypeGet the type of this rule.- Returns:
- the rule type; Integer or Boolean
 
- 
equals
- 
toString
- 
getByNameGet aGameRuleby its name.- Parameters:
- rule- the name of the GameRule
- Returns:
- the GameRuleor null if no GameRule matches the given name
 
- 
valuesGet an immutable collection ofGameRules.- Returns:
- an immutable collection containing all registered GameRules.
 
 
-