Class endstone::GameRule¶
ClassList > endstone > GameRule
Represents a game rule.
#include <endstone/game_rule.h>
Inherits the following classes: endstone::Registry::Type
Public Types inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| typedef Identifier< T > | Id The identifier type used to look up this object in its registry. |
Public Static Attributes¶
| Type | Name |
|---|---|
| constexpr auto | CommandBlockOutput = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("commandblockoutput")Whether command blocks notify administrators when they execute commands. |
| constexpr auto | CommandBlocksEnabled = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("commandblocksenabled")Whether command blocks can execute commands. |
| constexpr auto | DoDayLightCycle = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("dodaylightcycle")Whether the day and night cycles progress. |
| constexpr auto | DoEntityDrops = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("doentitydrops")Whether non-mob entities drop items. |
| constexpr auto | DoFireTick = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("dofiretick")Whether fire spreads. |
| constexpr auto | DoImmediateRespawn = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("doimmediaterespawn")Whether players immediately respawn. |
| constexpr auto | DoInsomnia = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("doinsomnia")Whether players experience insomnia. |
| constexpr auto | DoLimitedCrafting = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("dolimitedcrafting")Whether players can craft only unlocked recipes. |
| constexpr auto | DoMobLoot = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("domobloot")Whether mobs drop loot. |
| constexpr auto | DoMobSpawning = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("domobspawning")Whether mobs spawn naturally. |
| constexpr auto | DoTileDrops = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("dotiledrops")Whether blocks drop items when destroyed. |
| constexpr auto | DoWeatherCycle = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("doweathercycle")Whether the weather changes naturally. |
| constexpr auto | DrowningDamage = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("drowningdamage")Whether entities take drowning damage. |
| constexpr auto | FallDamage = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("falldamage")Whether entities take fall damage. |
| constexpr auto | FireDamage = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("firedamage")Whether entities take fire damage. |
| constexpr auto | FreezeDamage = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("freezedamage")Whether entities take freezing damage. |
| constexpr auto | FunctionCommandLimit = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("functioncommandlimit")The maximum number of commands executed by a function per tick. |
| constexpr auto | KeepInventory = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("keepinventory")Whether players keep their inventory on death. |
| constexpr auto | LocatorBar = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("locatorbar")Whether the locator bar is displayed. |
| constexpr auto | MaxCommandChainLength = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("maxcommandchainlength")The maximum number of chained commands executed per tick. |
| constexpr auto | MobGriefing = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("mobgriefing")Whether mobs can modify the world. |
| constexpr auto | NaturalRegeneration = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("naturalregeneration")Whether players regenerate health naturally. |
| constexpr auto | PlayerWaypoints = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("playerwaypoints")Whether player waypoints are added to locator bars. |
| constexpr auto | PlayersSleepingPercentage = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("playerssleepingpercentage")The percentage of players that must sleep to skip the night. |
| constexpr auto | ProjectilesCanBreakBlocks = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("projectilescanbreakblocks")Whether projectiles can break supported blocks. |
| constexpr auto | Pvp = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("pvp")Whether players can damage each other. |
| constexpr auto | RandomTickSpeed = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("randomtickspeed")The frequency of random block ticks. |
| constexpr auto | RecipesUnlock = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("recipesunlock")Whether built-in recipes unlock as players progress. |
| constexpr auto | RespawnBlocksExplode = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("respawnblocksexplode")Whether respawn blocks explode in other dimensions. |
| constexpr auto | SendCommandFeedback = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("sendcommandfeedback")Whether command feedback is displayed to players. |
| constexpr auto | ShowBorderEffect = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showbordereffect")Whether border block effects are shown. |
| constexpr auto | ShowCoordinates = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showcoordinates")Whether player coordinates are displayed. |
| constexpr auto | ShowDaysPlayed = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showdaysplayed")Whether the number of days played is displayed. |
| constexpr auto | ShowDeathMessages = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showdeathmessages")Whether death messages are displayed in chat. |
| constexpr auto | ShowRecipeMessages = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showrecipemessages")Whether recipe unlock notifications are shown. |
| constexpr auto | ShowTags = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("showtags")Whether item tags are shown. |
| constexpr auto | SpawnRadius = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**int**](classendstone_1_1Identifier.md)>::minecraft("spawnradius")The radius around world spawn in which players can spawn. |
| constexpr auto | TntExplodes = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("tntexplodes")Whether TNT blocks can be lit. |
| constexpr auto | TntExplosionDropDecay = [**GameRuleId**](classendstone_1_1GameRuleId.md)<[**bool**](classendstone_1_1Identifier.md)>::minecraft("tntexplosiondropdecay")Whether explosion drop decay is enabled for TNT. |
Public Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| virtual Id | getId () const = 0 Return the identifier of this object. |
| virtual std::string | getTranslationKey () const = 0 Get the translation key, suitable for use in a translation component. |
| operator Id () const |
|
| bool | operator!= (const Id & other) const |
| bool | operator!= (const T & other) const |
| bool | operator== (const Id & other) const |
| bool | operator== (const T & other) const |
| virtual | ~Type () = default |
Public Static Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| const T * | get (Id id) Look up a registry entry by identifier. |
Public Static Attributes Documentation¶
variable CommandBlockOutput¶
Whether command blocks notify administrators when they execute commands.
variable CommandBlocksEnabled¶
Whether command blocks can execute commands.
variable DoDayLightCycle¶
Whether the day and night cycles progress.
variable DoEntityDrops¶
Whether non-mob entities drop items.
variable DoFireTick¶
Whether fire spreads.
variable DoImmediateRespawn¶
Whether players immediately respawn.
variable DoInsomnia¶
Whether players experience insomnia.
variable DoLimitedCrafting¶
Whether players can craft only unlocked recipes.
variable DoMobLoot¶
Whether mobs drop loot.
variable DoMobSpawning¶
Whether mobs spawn naturally.
variable DoTileDrops¶
Whether blocks drop items when destroyed.
variable DoWeatherCycle¶
Whether the weather changes naturally.
variable DrowningDamage¶
Whether entities take drowning damage.
variable FallDamage¶
Whether entities take fall damage.
variable FireDamage¶
Whether entities take fire damage.
variable FreezeDamage¶
Whether entities take freezing damage.
variable FunctionCommandLimit¶
The maximum number of commands executed by a function per tick.
variable KeepInventory¶
Whether players keep their inventory on death.
variable LocatorBar¶
Whether the locator bar is displayed.
variable MaxCommandChainLength¶
The maximum number of chained commands executed per tick.
variable MobGriefing¶
Whether mobs can modify the world.
variable NaturalRegeneration¶
Whether players regenerate health naturally.
variable PlayerWaypoints¶
Whether player waypoints are added to locator bars.
variable PlayersSleepingPercentage¶
The percentage of players that must sleep to skip the night.
variable ProjectilesCanBreakBlocks¶
Whether projectiles can break supported blocks.
variable Pvp¶
Whether players can damage each other.
variable RandomTickSpeed¶
The frequency of random block ticks.
variable RecipesUnlock¶
Whether built-in recipes unlock as players progress.
variable RespawnBlocksExplode¶
Whether respawn blocks explode in other dimensions.
variable SendCommandFeedback¶
Whether command feedback is displayed to players.
variable ShowBorderEffect¶
Whether border block effects are shown.
variable ShowCoordinates¶
Whether player coordinates are displayed.
variable ShowDaysPlayed¶
Whether the number of days played is displayed.
variable ShowDeathMessages¶
Whether death messages are displayed in chat.
variable ShowRecipeMessages¶
Whether recipe unlock notifications are shown.
variable ShowTags¶
Whether item tags are shown.
variable SpawnRadius¶
The radius around world spawn in which players can spawn.
variable TntExplodes¶
Whether TNT blocks can be lit.
variable TntExplosionDropDecay¶
Whether explosion drop decay is enabled for TNT.
The documentation for this class was generated from the following file include/endstone/game_rule.h