All Implemented Interfaces:
ObservableConfig, ConfigurationMethods<ConfigurationSection>, ConfigurationSection
Direct Known Subclasses:
SubsystemConfig

public class KamiConfigExt extends KamiConfig
KamiConfig but with some extended features
  • Constructor Details

    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull JavaPlugin plugin, @NotNull @NotNull File file)
      Creates a new config instance with the given plugin and destination file.

      This constructor enables defaults using the following resource file method:
      - Assumes a resource file with the same name as the provided file, exists in the current jar.
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull JavaPlugin plugin, @NotNull @NotNull File file, @Nullable @Nullable Supplier<InputStream> defaultsStream)
      Creates a new config instance with the given plugin and destination file.

      This constructor uses defaults if and only if the provided supplier is NOT null:
      - Providing a non-null supplier will enable defaults using the provided InputStream - Providing a null supplier will disable defaults
      Parameters:
      defaultsStream - The optional supplier to load defaults from.
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull JavaPlugin plugin, @NotNull @NotNull ConfigSource source)
      Creates a new config instance with the given plugin and config source.

      This constructor enables defaults using the following resource file method:
      - Fetches the resource file. Its path is determined by ConfigSource.getResourceStreamPath()
      Parameters:
      source - The source to load and save the config from.
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull JavaPlugin plugin, @NotNull @NotNull ConfigSource source, @Nullable @Nullable Supplier<InputStream> defaultsStream)
      Creates a new config instance with the given plugin and config source.

      This constructor uses defaults if and only if the provided supplier is NOT null:
      - Providing a non-null supplier will enable defaults using the provided InputStream - Providing a null supplier will disable defaults
      Parameters:
      source - The source to load and save the config from.
      defaultsStream - The optional supplier to load defaults from.
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull AbstractSubsystem<?,?> subsystem, @NotNull @NotNull File file)
      Creates a new config instance with the given subsystem and destination file.

      This constructor enables defaults using the following resource file method:
      - Fetches the resource file using the provided file name, from AbstractSubsystem.getSupplementalConfigResource(File)
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull AbstractSubsystem<?,?> subsystem, @NotNull @NotNull File file, @Nullable @Nullable Supplier<InputStream> defaultsStream)
      Creates a new config instance with the given subsystem and destination file.

      This constructor uses defaults if and only if the provided supplier is NOT null:
      - Providing a non-null supplier will enable defaults using the provided InputStream - Providing a null supplier will disable defaults
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull AbstractSubsystem<?,?> subsystem, @NotNull @NotNull ConfigSource source)
      Creates a new config instance with the given subsystem and config source.

      This constructor enables defaults using the following resource file method:
      - Fetches the resource file using the provided source, from AbstractSubsystem.getSupplementalConfigResource(ConfigSource)
      Parameters:
      source - The source to load and save the config from.
    • KamiConfigExt

      public KamiConfigExt(@NotNull @NotNull AbstractSubsystem<?,?> subsystem, @NotNull @NotNull ConfigSource source, @Nullable @Nullable Supplier<InputStream> defaultsStream)
      Creates a new config instance with the given subsystem and config source.

      This constructor uses defaults if and only if the provided supplier is NOT null:
      - Providing a non-null supplier will enable defaults using the provided InputStream - Providing a null supplier will disable defaults
      Parameters:
      source - The source to load and save the config from.
      defaultsStream - The optional supplier to load defaults from.
  • Method Details