Class ConfigurableType

java.lang.Object
org.cyclops.cyclopscore.config.ConfigurableType

public class ConfigurableType extends Object
The different types of configurable.
  • Field Details

  • Constructor Details

    • ConfigurableType

      public ConfigurableType(boolean uniqueInstance, Class<? extends ExtendedConfig> configClass, ConfigurableTypeAction action, String category)
      Make a new instance.
      Parameters:
      uniqueInstance - If this type has a unique instance for each config.
      configClass - The config class.
      action - The action instance that helps with saving of the config and optional instance.
      category - The category in which the configs should be saved.
  • Method Details

    • hasUniqueInstance

      public boolean hasUniqueInstance()
      If this type should refer to a configurable with a unique instance. If this is true, the configurable should have a public static void initInstance(ExtendedConfig eConfig) method and also a public static (? extends IConfigurable) getInstance() method.
      Returns:
      If it has a unique instance.
    • getConfigClass

      public Class<? extends ExtendedConfig> getConfigClass()
      Get the class that extends ExtendedConfig this type can hold.
      Returns:
      The class that extends ExtendedConfig this type can hold.
    • getConfigurableTypeAction

      public ConfigurableTypeAction getConfigurableTypeAction()
      The action for this type after the the configurable has configured so it can be registered.
      Returns:
      The action for this type.
    • getCategory

      public String getCategory()
      The category of this type.
      Returns:
      The category.