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, 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(String)
KamiConfigExt
(@NotNull AbstractSubsystem<?, ?> subsystem, 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, 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, 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, getFile, getFloat, getFloat, getInt, getInt, getIntegerList, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLong, getLong, getShort, getShort, 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, unregisterConfigObservers
Methods inherited from class com.kamikazejam.kamicommon.configuration.standalone.AbstractConfig
isChanged, save, save, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, 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 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(String)
-
KamiConfigExt
public KamiConfigExt(@NotNull @NotNull AbstractSubsystem<?, ?> subsystem, 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
-
-
Method Details
-
getString
- Specified by:
getString
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
getString
in classKamiConfig
-
getString
- Specified by:
getString
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
getString
in classKamiConfig
-
getStringList
- Specified by:
getStringList
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
getStringList
in classKamiConfig
-
getStringList
- Specified by:
getStringList
in interfaceConfigurationMethods<ConfigurationSection>
- Overrides:
getStringList
in classKamiConfig
-
applyThisPlaceholders
-