public final class GameRule<T>
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static GameRule<java.lang.Boolean> |
ANNOUNCE_ADVANCEMENTS |
Toggles the announcing of advancements.
|
static GameRule<java.lang.Boolean> |
COMMAND_BLOCK_OUTPUT |
Whether command blocks should notify admins when they perform commands.
|
static GameRule<java.lang.Boolean> |
DISABLE_ELYTRA_MOVEMENT_CHECK |
Whether the server should skip checking player speed when the player is
wearing elytra.
|
static GameRule<java.lang.Boolean> |
DO_DAYLIGHT_CYCLE |
Whether time progresses from the current moment.
|
static GameRule<java.lang.Boolean> |
DO_ENTITY_DROPS |
Whether entities that are not mobs should have drops.
|
static GameRule<java.lang.Boolean> |
DO_FIRE_TICK |
Whether fire should spread and naturally extinguish.
|
static GameRule<java.lang.Boolean> |
DO_LIMITED_CRAFTING |
Whether players should only be able to craft recipes they've unlocked
first.
|
static GameRule<java.lang.Boolean> |
DO_MOB_LOOT |
Whether mobs should drop items.
|
static GameRule<java.lang.Boolean> |
DO_MOB_SPAWNING |
Whether mobs should naturally spawn.
|
static GameRule<java.lang.Boolean> |
DO_TILE_DROPS |
Whether blocks should have drops.
|
static GameRule<java.lang.Boolean> |
DO_WEATHER_CYCLE |
Whether the weather will change from the current moment.
|
static GameRule<java.lang.Boolean> |
KEEP_INVENTORY |
Whether the player should keep items in their inventory after death.
|
static GameRule<java.lang.Boolean> |
LOG_ADMIN_COMMANDS |
Whether to log admin commands to server log.
|
static GameRule<java.lang.Integer> |
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 GameRule<java.lang.Integer> |
MAX_ENTITY_CRAMMING |
The maximum number of other pushable entities a mob or player can push,
before taking suffocation damage.
|
static GameRule<java.lang.Boolean> |
MOB_GRIEFING |
Whether mobs can pick up items or change blocks.
|
static GameRule<java.lang.Boolean> |
NATURAL_REGENERATION |
Whether players can regenerate health naturally through their hunger bar.
|
static GameRule<java.lang.Integer> |
RANDOM_TICK_SPEED |
How often a random block tick occurs (such as plant growth, leaf decay,
etc.) per chunk section per game tick.
|
static GameRule<java.lang.Boolean> |
REDUCED_DEBUG_INFO |
Whether the debug screen shows all or reduced information.
|
static GameRule<java.lang.Boolean> |
SEND_COMMAND_FEEDBACK |
Whether the feedback from commands executed by a player should show up in
chat.
|
static GameRule<java.lang.Boolean> |
SHOW_DEATH_MESSAGES |
Whether a message appears in chat when a player dies.
|
static GameRule<java.lang.Integer> |
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 GameRule<java.lang.Boolean> |
SPECTATORS_GENERATE_CHUNKS |
Whether players in spectator mode can generate chunks.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
static GameRule<?> |
getByName(java.lang.String rule) |
Get a
GameRule by its name. |
java.lang.String |
getName() |
Get the name of this GameRule.
|
java.lang.Class<T> |
getType() |
Get the type of this rule.
|
java.lang.String |
toString() |
|
static GameRule<?>[] |
values() |
Get an immutable collection of
GameRule s. |
public static final GameRule<java.lang.Boolean> ANNOUNCE_ADVANCEMENTS
public static final GameRule<java.lang.Boolean> COMMAND_BLOCK_OUTPUT
public static final GameRule<java.lang.Boolean> DISABLE_ELYTRA_MOVEMENT_CHECK
public static final GameRule<java.lang.Boolean> DO_DAYLIGHT_CYCLE
public static final GameRule<java.lang.Boolean> DO_ENTITY_DROPS
public static final GameRule<java.lang.Boolean> DO_FIRE_TICK
public static final GameRule<java.lang.Boolean> DO_LIMITED_CRAFTING
public static final GameRule<java.lang.Boolean> DO_MOB_LOOT
public static final GameRule<java.lang.Boolean> DO_MOB_SPAWNING
public static final GameRule<java.lang.Boolean> DO_TILE_DROPS
public static final GameRule<java.lang.Boolean> DO_WEATHER_CYCLE
public static final GameRule<java.lang.Boolean> KEEP_INVENTORY
public static final GameRule<java.lang.Boolean> LOG_ADMIN_COMMANDS
public static final GameRule<java.lang.Boolean> MOB_GRIEFING
public static final GameRule<java.lang.Boolean> NATURAL_REGENERATION
public static final GameRule<java.lang.Boolean> REDUCED_DEBUG_INFO
public static final GameRule<java.lang.Boolean> SEND_COMMAND_FEEDBACK
public static final GameRule<java.lang.Boolean> SHOW_DEATH_MESSAGES
public static final GameRule<java.lang.Boolean> SPECTATORS_GENERATE_CHUNKS
public static final GameRule<java.lang.Integer> RANDOM_TICK_SPEED
public static final GameRule<java.lang.Integer> SPAWN_RADIUS
public static final GameRule<java.lang.Integer> MAX_ENTITY_CRAMMING
public static final GameRule<java.lang.Integer> MAX_COMMAND_CHAIN_LENGTH
public java.lang.String getName()
public java.lang.Class<T> getType()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static GameRule<?> getByName(java.lang.String rule)
GameRule
by its name.rule
- the name of the GameRuleGameRule
or null if no GameRule matches the given
nameCopyright © 2018. All rights reserved.