Class KamiConfigExt
java.lang.Object
com.kamikazejam.kamicommon.configuration.standalone.AbstractConfig<YamlConfiguration>
com.kamikazejam.kamicommon.configuration.spigot.KamiConfig
com.kamikazejam.kamicommon.configuration.spigot.KamiConfigExt
- All Implemented Interfaces:
ObservableConfig,ConfigurationMethods<ConfigurationSection>,ConfigurationSection
- Direct Known Subclasses:
SubsystemConfig
KamiConfig but with some extended features-
Constructor Summary
ConstructorsConstructorDescriptionKamiConfigExt(@NotNull AbstractSubsystem<?, ?> subsystem, @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, fromAbstractSubsystem.getSupplementalConfigResource(ConfigSource)KamiConfigExt(@NotNull AbstractSubsystem<?, ?> subsystem, @NotNull ConfigSource source, @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 defaultsKamiConfigExt(@NotNull AbstractSubsystem<?, ?> subsystem, @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, fromAbstractSubsystem.getSupplementalConfigResource(File)KamiConfigExt(@NotNull AbstractSubsystem<?, ?> subsystem, @NotNull File file, @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 defaultsKamiConfigExt(@NotNull JavaPlugin plugin, @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.KamiConfigExt(@NotNull JavaPlugin plugin, @NotNull ConfigSource source, @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 defaultsKamiConfigExt(@NotNull JavaPlugin plugin, @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(@NotNull JavaPlugin plugin, @NotNull File file, @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 -
Method Summary
Methods inherited from class com.kamikazejam.kamicommon.configuration.spigot.KamiConfig
addDefault, contains, get, get, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getByte, getByte, getByteList, getByteList, getConfigurationSection, getConfigurationSequence, getCurrentPath, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getShort, getShort, getSource, getYamlConfiguration, isBoolean, isByte, isConfigurationSection, isDouble, isEmpty, isFloat, isInt, isItemStack, isList, isLong, isNumber, isSet, isShort, isString, parseItemBuilder, put, putBoolean, putByte, putDouble, putFloat, putInt, putInteger, putLong, putShort, putString, registerConfigObserver, reload, reloadObservableConfig, set, setBoolean, setByte, setDouble, setFloat, setInt, setInteger, setItemStack, setLong, setShort, setString, unregisterConfigObserver, unregisterConfigObserversMethods inherited from class com.kamikazejam.kamicommon.configuration.standalone.AbstractConfig
isChanged, save, save, setChangedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kamikazejam.kamicommon.yaml.base.ConfigurationMethods
isChanged, setChanged
-
Constructor Details
-
KamiConfigExt
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
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 byConfigSource.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, fromAbstractSubsystem.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, fromAbstractSubsystem.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
-
getString
- Specified by:
getStringin interfaceConfigurationMethods<ConfigurationSection>- Overrides:
getStringin classKamiConfig
-
getString
- Specified by:
getStringin interfaceConfigurationMethods<ConfigurationSection>- Overrides:
getStringin classKamiConfig
-
getStringList
- Specified by:
getStringListin interfaceConfigurationMethods<ConfigurationSection>- Overrides:
getStringListin classKamiConfig
-
getStringList
- Specified by:
getStringListin interfaceConfigurationMethods<ConfigurationSection>- Overrides:
getStringListin classKamiConfig
-
applyThisPlaceholders
-