Interface IConfigReader

All Known Implementing Classes:
ConfigReaderSpigot

public interface IConfigReader
Represents an object that can read values from configs.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    get(String path, @Nullable Object fallback)
    Gets the value of a config option at a given path.
    Gets a set containing all keys.
  • Method Details

    • get

      @Contract("_, !null -> !null") @Nullable @Nullable Object get(String path, @Nullable @Nullable Object fallback)
      Gets the value of a config option at a given path. If unavailable, the default object is returned instead.
      Parameters:
      path - The path of the config option to read.
      fallback - The default value to return if the actual option in the config was unavailable.
      Returns:
      The value of the config option if possible, otherwise the default value.
    • getKeys

      Set<String> getKeys()
      Gets a set containing all keys.