Enum Class GameRule

java.lang.Object
java.lang.Enum<GameRule>
cn.nukkit.level.GameRule
All Implemented Interfaces:
Serializable, Comparable<GameRule>, Constable

public enum GameRule extends Enum<GameRule>
  • Enum Constant Details

    • COMMAND_BLOCKS_ENABLED

      public static final GameRule COMMAND_BLOCKS_ENABLED
    • COMMAND_BLOCK_OUTPUT

      public static final GameRule COMMAND_BLOCK_OUTPUT
    • DO_DAYLIGHT_CYCLE

      public static final GameRule DO_DAYLIGHT_CYCLE
    • DO_ENTITY_DROPS

      public static final GameRule DO_ENTITY_DROPS
    • DO_FIRE_TICK

      public static final GameRule DO_FIRE_TICK
    • DO_INSOMNIA

      public static final GameRule DO_INSOMNIA
    • DO_IMMEDIATE_RESPAWN

      public static final GameRule DO_IMMEDIATE_RESPAWN
    • DO_MOB_LOOT

      public static final GameRule DO_MOB_LOOT
    • DO_MOB_SPAWNING

      public static final GameRule DO_MOB_SPAWNING
    • DO_TILE_DROPS

      public static final GameRule DO_TILE_DROPS
    • DO_WEATHER_CYCLE

      public static final GameRule DO_WEATHER_CYCLE
    • DROWNING_DAMAGE

      public static final GameRule DROWNING_DAMAGE
    • FALL_DAMAGE

      public static final GameRule FALL_DAMAGE
    • FIRE_DAMAGE

      public static final GameRule FIRE_DAMAGE
    • FREEZE_DAMAGE

      @Since("1.5.1.0-PN") public static final GameRule FREEZE_DAMAGE
    • FUNCTION_COMMAND_LIMIT

      public static final GameRule FUNCTION_COMMAND_LIMIT
    • KEEP_INVENTORY

      public static final GameRule KEEP_INVENTORY
    • MAX_COMMAND_CHAIN_LENGTH

      public static final GameRule MAX_COMMAND_CHAIN_LENGTH
    • MOB_GRIEFING

      public static final GameRule MOB_GRIEFING
    • NATURAL_REGENERATION

      public static final GameRule NATURAL_REGENERATION
    • PVP

      public static final GameRule PVP
    • RANDOM_TICK_SPEED

      public static final GameRule RANDOM_TICK_SPEED
    • SEND_COMMAND_FEEDBACK

      public static final GameRule SEND_COMMAND_FEEDBACK
    • SHOW_COORDINATES

      public static final GameRule SHOW_COORDINATES
    • SHOW_DEATH_MESSAGES

      @Since("1.5.1.0-PN") public static final GameRule SHOW_DEATH_MESSAGES
    • SHOW_DEATH_MESSAGE

      @Deprecated @PowerNukkitOnly("Renamed to SHOW_DEATH_MESSAGE by NukkitX") @DeprecationDetails(since="1.5.1.0-PN", reason="Added by upstream with a different name", replaceWith="SHOW_DEATH_MESSAGES") public static final GameRule SHOW_DEATH_MESSAGE
      Deprecated.
    • SPAWN_RADIUS

      public static final GameRule SPAWN_RADIUS
    • TNT_EXPLODES

      public static final GameRule TNT_EXPLODES
    • EXPERIMENTAL_GAMEPLAY

      @PowerNukkitOnly public static final GameRule EXPERIMENTAL_GAMEPLAY
    • SHOW_TAGS

      public static final GameRule SHOW_TAGS
  • Field Details

  • Method Details

    • values

      public static GameRule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GameRule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parseString

      public static Optional<GameRule> parseString(String gameRuleString)
    • getNames

      public static String[] getNames()
    • getName

      public String getName()
    • isDeprecated

      @PowerNukkitOnly @Since("1.5.1.0-PN") public boolean isDeprecated()