Class OptionalFeaturesManager

java.lang.Object
net.minheur.potoflux.settings.OptionalFeaturesManager

public final class OptionalFeaturesManager extends Object
Manages the optional features
  • Method Details

    • load

      public static void load()
      Called to load optional features from the file
    • getFeatureMap

      public static Map<String,OptionalFeature> getFeatureMap()
      Getter for the featureMap
      Returns:
      featureMap
    • getRaw

      public static Object getRaw(String key, Object defaultValue)
      Gets a raw feature
      Parameters:
      key - used in the file
      defaultValue - used if the feature is not set
      Returns:
      the value of the feature
    • getRaw

      public static Object getRaw(String key)
      Gets a raw feature
      Parameters:
      key - used in the file
      Returns:
      the value of the feature, null if none set
    • getString

      public static String getString(String key, String defaultValue)
      Gets feature with a String value
      Parameters:
      key - used in the file
      defaultValue - used if the feature is not set
      Returns:
      the value of the feature
    • getString

      @Nullable public static @Nullable String getString(String key)
      Gets a feature with a String value
      Parameters:
      key - used in the file
      Returns:
      the value of the feature, null if none set
    • getBoolean

      public static Boolean getBoolean(String key, Boolean defaultValue)
      Gets a feature with a Boolean value
      Parameters:
      key - used in the file
      defaultValue - used if the feature is not set
      Returns:
      the value of the feature
    • getBoolean

      @Nullable public static @Nullable Boolean getBoolean(String key)
      Gets a feature with a Boolean value
      Parameters:
      key - used in the file
      Returns:
      the value of the feature, null if none set
    • getInt

      public static Integer getInt(String key, Integer defaultValue)
      Gets a feature with an Integer value
      Parameters:
      key - used in the file
      defaultValue - used if the feature is not set
      Returns:
      the value of the feature
    • getInt

      public static Integer getInt(String key)
      Gets a feature with a Integer value
      Parameters:
      key - used in the file
      Returns:
      the value of the feature, null if none set