Class SubsystemConfig<S extends AbstractSubsystem<?,S>>
java.lang.Object
com.kamikazejam.kamicommon.configuration.standalone.AbstractConfig<YamlConfiguration>
com.kamikazejam.kamicommon.configuration.spigot.KamiConfig
com.kamikazejam.kamicommon.configuration.spigot.KamiConfigExt
com.kamikazejam.kamicommon.subsystem.SubsystemConfig<S>
- All Implemented Interfaces:
ObservableConfig,ConfigurationMethods<ConfigurationSection>,ConfigurationSection
- Direct Known Subclasses:
FeatureConfig,ModuleConfig
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubsystemConfig(S subsystem, @NotNull ConfigSource source, @NotNull String resourcePath) Constructor for subsystems using ConfigSource (e.g.protectedSubsystemConfig(S subsystem, @NotNull String resourcePath) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull InputStreamgetIS(@NotNull AbstractSubsystem<?, ?> subsystem, @NotNull String resourcePath) Helper method to get a resourceInputStreamfrom a subsystem's plugin.@NotNull LocationgetLocation(String key) Reads aLocationfrom the current config file using the standard location format.Methods inherited from class com.kamikazejam.kamicommon.configuration.spigot.KamiConfigExt
applyThisPlaceholders, getString, getString, getStringList, getStringListMethods 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
-
SubsystemConfig
-
SubsystemConfig
protected SubsystemConfig(@NotNull S subsystem, @NotNull @NotNull ConfigSource source, @NotNull @NotNull String resourcePath) Constructor for subsystems using ConfigSource (e.g. from a database or other source)- Parameters:
subsystem- The parent subsystemsource- The config source where the yaml contents will be read fromresourcePath- The resource path to the default config file inside the plugin jar
-
-
Method Details
-
getIS
@NotNull public static @NotNull InputStream getIS(@NotNull @NotNull AbstractSubsystem<?, ?> subsystem, @NotNull @NotNull String resourcePath) Helper method to get a resourceInputStreamfrom a subsystem's plugin. -
getSubsystem
-
getLocation
Reads aLocationfrom the current config file using the standard location format.- Parameters:
key- The root key of the location in the config file, e.g. "spawn" which has subkeys: "spawn.x", "spawn.y", etc.- Throws:
IllegalArgumentException
-