Package org.bukkit

Interface GameRule<T>

Type Parameters:
T - type of rule (Boolean or Integer)
All Superinterfaces:
Keyed, RegistryAware

public interface GameRule<T> extends Keyed, RegistryAware
GameRules dictate certain behavior within Minecraft itself
For more information please visit the Minecraft Wiki
  • Field Details

    • SHOW_ADVANCEMENT_MESSAGES

      static final GameRule<Boolean> SHOW_ADVANCEMENT_MESSAGES
      Toggles the announcing of advancements.
    • COMMAND_BLOCK_OUTPUT

      static final GameRule<Boolean> COMMAND_BLOCK_OUTPUT
      Whether command blocks should notify admins when they perform commands.
    • PLAYER_MOVEMENT_CHECK

      static final GameRule<Boolean> PLAYER_MOVEMENT_CHECK
      Whether the server should skip checking player speed.
    • ELYTRA_MOVEMENT_CHECK

      static final GameRule<Boolean> ELYTRA_MOVEMENT_CHECK
      Whether the server should skip checking player speed when the player is wearing elytra.
    • ADVANCE_TIME

      static final GameRule<Boolean> ADVANCE_TIME
      Whether time progresses from the current moment.
    • ENTITY_DROPS

      static final GameRule<Boolean> ENTITY_DROPS
      Whether entities that are not mobs should have drops.
    • LIMITED_CRAFTING

      static final GameRule<Boolean> LIMITED_CRAFTING
      Whether players should only be able to craft recipes they've unlocked first.
    • MOB_DROPS

      static final GameRule<Boolean> MOB_DROPS
      Whether mobs should drop items.
    • PROJECTILES_CAN_BREAK_BLOCKS

      static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS
      Whether projectiles can break blocks.
    • SPAWN_MOBS

      static final GameRule<Boolean> SPAWN_MOBS
      Whether mobs should naturally spawn.
    • BLOCK_DROPS

      static final GameRule<Boolean> BLOCK_DROPS
      Whether blocks should have drops.
    • ADVANCE_WEATHER

      static final GameRule<Boolean> ADVANCE_WEATHER
      Whether the weather will change from the current moment.
    • KEEP_INVENTORY

      static final GameRule<Boolean> KEEP_INVENTORY
      Whether the player should keep items in their inventory after death.
    • LOG_ADMIN_COMMANDS

      static final GameRule<Boolean> LOG_ADMIN_COMMANDS
      Whether to log admin commands to server log.
    • MOB_GRIEFING

      static final GameRule<Boolean> MOB_GRIEFING
      Whether mobs can pick up items or change blocks.
    • NATURAL_HEALTH_REGENERATION

      static final GameRule<Boolean> NATURAL_HEALTH_REGENERATION
      Whether players can regenerate health naturally through their hunger bar.
    • REDUCED_DEBUG_INFO

      static final GameRule<Boolean> REDUCED_DEBUG_INFO
      Whether the debug screen shows all or reduced information.
    • SEND_COMMAND_FEEDBACK

      static final GameRule<Boolean> SEND_COMMAND_FEEDBACK
      Whether 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

      static final GameRule<Boolean> SHOW_DEATH_MESSAGES
      Whether a message appears in chat when a player dies.
    • SPECTATORS_GENERATE_CHUNKS

      static final GameRule<Boolean> SPECTATORS_GENERATE_CHUNKS
      Whether players in spectator mode can generate chunks.
    • RAIDS

      static final GameRule<Boolean> RAIDS
      Whether pillager raids are enabled or not.
    • SPAWN_PHANTOMS

      static final GameRule<Boolean> SPAWN_PHANTOMS
      Whether phantoms will appear without sleeping or not.
    • IMMEDIATE_RESPAWN

      static final GameRule<Boolean> IMMEDIATE_RESPAWN
      Whether clients will respawn immediately after death or not.
    • DROWNING_DAMAGE

      static final GameRule<Boolean> DROWNING_DAMAGE
      Whether drowning damage is enabled or not.
    • FALL_DAMAGE

      static final GameRule<Boolean> FALL_DAMAGE
      Whether fall damage is enabled or not.
    • FIRE_DAMAGE

      static final GameRule<Boolean> FIRE_DAMAGE
      Whether fire damage is enabled or not.
    • FREEZE_DAMAGE

      static final GameRule<Boolean> FREEZE_DAMAGE
      Whether freeze damage is enabled or not.
    • SPAWN_PATROLS

      static final GameRule<Boolean> SPAWN_PATROLS
      Whether patrols should naturally spawn.
    • SPAWN_WANDERING_TRADERS

      static final GameRule<Boolean> SPAWN_WANDERING_TRADERS
      Whether traders should naturally spawn.
    • SPAWN_WARDENS

      static final GameRule<Boolean> SPAWN_WARDENS
      Whether wardens should naturally spawn.
    • FORGIVE_DEAD_PLAYERS

      static final GameRule<Boolean> FORGIVE_DEAD_PLAYERS
      Whether mobs should cease being angry at a player once they die.
    • UNIVERSAL_ANGER

      static final GameRule<Boolean> UNIVERSAL_ANGER
      Whether mobs will target all player entities once angered.
    • BLOCK_EXPLOSION_DROP_DECAY

      static final GameRule<Boolean> BLOCK_EXPLOSION_DROP_DECAY
      Whether block explosions will destroy dropped items.
    • MOB_EXPLOSION_DROP_DECAY

      static final GameRule<Boolean> MOB_EXPLOSION_DROP_DECAY
      * Whether mob explosions will destroy dropped items.
    • TNT_EXPLOSION_DROP_DECAY

      static final GameRule<Boolean> TNT_EXPLOSION_DROP_DECAY
      Whether tnt explosions will destroy dropped items.
    • WATER_SOURCE_CONVERSION

      static final GameRule<Boolean> WATER_SOURCE_CONVERSION
      Whether water blocks can convert into water source blocks.
    • LAVA_SOURCE_CONVERSION

      static final GameRule<Boolean> LAVA_SOURCE_CONVERSION
      Whether lava blocks can convert into lava source blocks.
    • GLOBAL_SOUND_EVENTS

      static final GameRule<Boolean> GLOBAL_SOUND_EVENTS
      Whether global level events such as ender dragon, wither, and completed end portal effects will propagate across the entire server.
    • SPREAD_VINES

      static final GameRule<Boolean> SPREAD_VINES
      Whether vines will spread.
    • ENDER_PEARLS_VANISH_ON_DEATH

      static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH
      Whether ender pearls will vanish on player death.
    • TNT_EXPLODES

      static final GameRule<Boolean> TNT_EXPLODES
      Whether TNT explodes.
    • LOCATOR_BAR

      static final GameRule<Boolean> LOCATOR_BAR
      Whether the locator bar is enabled.
    • PVP

      static final GameRule<Boolean> PVP
      Whether PvP is enabled.
    • ALLOW_ENTERING_NETHER_USING_PORTALS

      static final GameRule<Boolean> ALLOW_ENTERING_NETHER_USING_PORTALS
      Whether nether portals can be used to enter the nether.
    • SPAWN_MONSTERS

      static final GameRule<Boolean> SPAWN_MONSTERS
      Whether monsters will spawn.
    • COMMAND_BLOCKS_WORK

      static final GameRule<Boolean> COMMAND_BLOCKS_WORK
      Whether command blocks are enabled.
    • SPAWNER_BLOCKS_WORK

      static final GameRule<Boolean> SPAWNER_BLOCKS_WORK
      Whether spawner blocks are enabled.
    • RANDOM_TICK_SPEED

      static final GameRule<Integer> RANDOM_TICK_SPEED
      How 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.
    • RESPAWN_RADIUS

      static final GameRule<Integer> RESPAWN_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.
    • MAX_ENTITY_CRAMMING

      static final GameRule<Integer> MAX_ENTITY_CRAMMING
      The maximum number of other pushable entities a mob or player can push, before taking suffocation damage.
      Setting to 0 disables this rule.
    • MAX_COMMAND_SEQUENCE_LENGTH

      static final GameRule<Integer> MAX_COMMAND_SEQUENCE_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.
    • MAX_COMMAND_FORKS

      static final GameRule<Integer> MAX_COMMAND_FORKS
      Determines the number of different commands/functions which execute commands can fork into.
    • MAX_BLOCK_MODIFICATIONS

      static final GameRule<Integer> MAX_BLOCK_MODIFICATIONS
      Determines the maximum number of blocks which a command can modify.
    • PLAYERS_SLEEPING_PERCENTAGE

      static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE
      The percentage of online players which must be sleeping for the night to advance.
    • MAX_SNOW_ACCUMULATION_HEIGHT

      static final GameRule<Integer> MAX_SNOW_ACCUMULATION_HEIGHT
    • PLAYERS_NETHER_PORTAL_DEFAULT_DELAY

      static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY
      The amount of time a player must stand in a nether portal before the portal activates.
    • PLAYERS_NETHER_PORTAL_CREATIVE_DELAY

      static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY
      The amount of time a player in creative mode must stand in a nether portal before the portal activates.
    • MAX_MINECART_SPEED

      @Experimental @MinecraftExperimental(MINECART_IMPROVEMENTS) static final GameRule<Integer> MAX_MINECART_SPEED
      The maximum speed of minecarts (when the new movement algorithm is enabled).
    • FIRE_SPREAD_RADIUS_AROUND_PLAYER

      static final GameRule<Integer> FIRE_SPREAD_RADIUS_AROUND_PLAYER
      The radius in blocks that fire can spread around a player (0 to disable spread, -1 to allow spread without players).
  • Method Details