Class ConfigManager

java.lang.Object
net.fateuhc.plugin.api.managers.ConfigManager

public class ConfigManager extends Object
  • Constructor Details

    • ConfigManager

      public ConfigManager()
  • Method Details

    • registerConfig

      public void registerConfig(boolean active, boolean defaultActive, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      active - Is the configuration active?
      defaultActive - Is the configuration active by default?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • registerConfig

      public void registerConfig(boolean active, boolean defaultActive, boolean lobbyModeOnlyEdit, org.bukkit.Material material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      active - Is the configuration active?
      defaultActive - Is the configuration active by default?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • registerConfig

      public void registerConfig(boolean active, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      active - Is the configuration active?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • registerConfig

      public void registerConfig(int amount, int defaultAmount, boolean editable, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      amount - What is the amount the config option should have?
      defaultAmount - What is the default amount the config option should have?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • registerConfig

      public void registerConfig(int amount, int defaultAmount, boolean editable, boolean lobbyModeOnlyEdit, org.bukkit.Material material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      amount - What is the amount the config option should have?
      defaultAmount - What is the default amount the config option should have?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • registerConfig

      public void registerConfig(int amount, boolean lobbyModeOnlyEdit, com.cryptomorin.xseries.XMaterial material, String alias, String name, String... description)
      Register a configuration option within FateUHC.
      Parameters:
      amount - What is the amount the config option should have?
      lobbyModeOnlyEdit - Should it only be able to be toggled in lobby mode only?
      material - What material should the item be in the menu?
      alias - What is the alias of the config option?
      name - What is the name of the config option?
      description - What is the description of the config option?
    • getByName

      public ConfigData getByName(String name)
      Retrieves the configuration with the given name.
      Parameters:
      name - The name of the configuration to retrieve.
      Returns:
      ConfigData
    • getByAlias

      public ConfigData getByAlias(String alias)
      Retrieves the configuration with the given alias.
      Parameters:
      alias - The alias of the configuration to retrieve.
      Returns:
      ConfigData
    • getConfig

      @Deprecated public Config getConfig(Config source)
      Retrieves the configuration for the given source.
      Parameters:
      source - The source configuration.
      Returns:
      The configuration object.
    • getByConfig

      public ConfigData getByConfig(Config source)
      Retrieves the configuration for the given source.
      Parameters:
      source - The source configuration.
      Returns:
      ConfigData
    • getConfigurations

      @Deprecated public List<Config> getConfigurations()
      Deprecated.
      Use getAllConfigs() instead.
      Retrieves the list of configurations.
      Returns:
      The list of configurations.
    • setConfigurations

      @Deprecated public void setConfigurations(List<Config> configurations)
      Deprecated.
      Sets the configurations for the UHC instance.
      Parameters:
      configurations - The list of configurations to set.
    • getActiveConfigs

      public List<ConfigData> getActiveConfigs()
      Retrieves the list of active configs.
      Returns:
      A List of ConfigData.
    • getActiveConfigNames

      public List<String> getActiveConfigNames()
      Retrieves the list of active config names.
      Returns:
      A List of String.
    • getActiveConfigAliases

      public List<String> getActiveConfigAliases()
      Retrieves the list of active configs aliases.
      Returns:
      A List of String.
    • getAllConfigs

      public List<ConfigData> getAllConfigs()
      Retrieves the list of config options.
      Returns:
      The List of ConfigData.
    • getAllConfigsName

      public List<String> getAllConfigsName()
      Retrieves the list of config names.
      Returns:
      The List of Strings.
    • getAllConfigsAlias

      public List<String> getAllConfigsAlias()
      Retrieves the list of config aliases.
      Returns:
      The List of Strings.