Class EnvFlag

java.lang.Object
cn.lunadeer.dominion.api.dtos.flag.Flag
cn.lunadeer.dominion.api.dtos.flag.EnvFlag

public class EnvFlag extends Flag
A flag controlling environmental behavior inside a dominion.

Environment flags use the environment.<flag> configuration namespace.

  • Constructor Details

    • EnvFlag

      public EnvFlag(@NotNull @NotNull String flag_name, @NotNull @NotNull String display_name, @NotNull @NotNull String description, @NotNull @NotNull Boolean default_value, @NotNull @NotNull Boolean enable, @NotNull @NotNull org.bukkit.Material material)
      Constructs a new EnvFlag with the specified parameters.
      Parameters:
      flag_name - the name of the flag
      display_name - the display name of the flag
      description - the description of the flag
      default_value - the default value of the flag
      enable - the enable status of the flag
      material - the material of flag in CUI
    • EnvFlag

      public EnvFlag(@NotNull @NotNull String flag_name, @NotNull @NotNull String display_name, @NotNull @NotNull String description, @NotNull @NotNull Boolean default_value, @NotNull @NotNull Boolean enable, @NotNull @NotNull org.bukkit.Material material, @Nullable @Nullable String icon)
      Constructs an environment flag with an optional native Dialog UI icon.
      Parameters:
      flag_name - the stable flag name
      display_name - the default display name
      description - the default description
      default_value - the default value
      enable - whether the flag is enabled
      material - the material used in chest UIs
      icon - the Dialog UI sprite path, or null for no icon
  • Method Details

    • getConfigurationDescKey

      public String getConfigurationDescKey()
      Returns the configuration key for the description of this flag.
      Specified by:
      getConfigurationDescKey in class Flag
      Returns:
      the configuration key for the description
    • getConfigurationDefaultKey

      public String getConfigurationDefaultKey()
      Returns the configuration key for the default value of this flag.
      Specified by:
      getConfigurationDefaultKey in class Flag
      Returns:
      the configuration key for the default value
    • getConfigurationEnableKey

      public String getConfigurationEnableKey()
      Returns the configuration key for the enable status of this flag.
      Specified by:
      getConfigurationEnableKey in class Flag
      Returns:
      the configuration key for the enable status
    • getConfigurationNameKey

      public String getConfigurationNameKey()
      Returns the configuration key for the name of this flag.
      Specified by:
      getConfigurationNameKey in class Flag
      Returns:
      the configuration key for the name
    • getConfigurationMaterialKey

      public String getConfigurationMaterialKey()
      Returns the configuration key for the material of this flag.
      Specified by:
      getConfigurationMaterialKey in class Flag
      Returns:
      the configuration key for the material