Enum Class KitRule

java.lang.Object
java.lang.Enum<KitRule>
com.xyrisdev.cloud.kits.model.KitRule
All Implemented Interfaces:
Serializable, Comparable<KitRule>, Constable

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

    • HUNGER

      public static final KitRule HUNGER
      If enabled, players will not lose hunger. Default: false (Players will lose hunger).
    • BUILD

      public static final KitRule BUILD
      If enabled, players will be able to place blocks. Default: false (Players will not be able to place blocks).
    • BREAK

      public static final KitRule BREAK
      If enabled, players will be able to break blocks. Default: false (Players will not be able to break blocks).
    • PLAYER_PLACED_BLOCK_BREAK

      public static final KitRule PLAYER_PLACED_BLOCK_BREAK
      If enabled, players will be able to break blocks placed by them and their opponent. Default: false (Players will not be able to break blocks placed by themselves or their opponent). Overrides BREAK invalid input: '&' BUILD.
    • FALL_DAMAGE

      public static final KitRule FALL_DAMAGE
      If enabled, players will not take fall damage. Default: false (Players will take fall damage).
    • DAMAGE

      public static final KitRule DAMAGE
      If enabled, players will not take damage. Default: false (Players will take damage).
    • HEALTH_REGENERATION

      public static final KitRule HEALTH_REGENERATION
      If enabled, players will not regenerate health. Default: false (Players will regenerate health).
    • CRAFTING

      public static final KitRule CRAFTING
      If enabled, players will not be able to craft items. Default: false (Players will be able to craft items).
    • DESPAWN_ARROWS

      public static final KitRule DESPAWN_ARROWS
      If enabled, the shot arrows will despawn automatically. Default: false (Shot arrows will not despawn automatically).
    • BOXING

      public static final KitRule BOXING
      If enabled, the first player to reach 100 hits wins. Default: false (The hit-based victory condition is not enabled).
    • SUMO

      public static final KitRule SUMO
      If enabled, the player to touch water loses. Default: false (Touching water does not result in a loss).
  • Method Details

    • values

      public static KitRule[] 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 KitRule 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
    • enabled

      public static boolean enabled(KitRule rule, String kit)
      Checks if a specific rule is enabled for a given kit.
      Parameters:
      rule - The rule to check.
      kit - The kit name.
      Returns:
      true if the rule is enabled for the given kit, otherwise false.
    • fromString

      @Nullable public static @Nullable KitRule fromString(@NotNull @NotNull String rule)
      Converts a string representation of a rule to the corresponding KitRule enum.
      Parameters:
      rule - The string representation of the rule.
      Returns:
      The corresponding KitRule if valid, otherwise null.