Package dev.aura.bungeechat.config
Class Configuration
- java.lang.Object
-
- dev.aura.bungeechat.config.Configuration
-
- All Implemented Interfaces:
Config,ConfigMergeable
public class Configuration extends Object implements Config
-
-
Field Summary
Fields Modifier and Type Field Description protected Configconfigprotected static FileCONFIG_FILEprotected static StringCONFIG_FILE_NAMEprotected static FileOLD_CONFIG_FILEprotected static StringOLD_CONFIG_FILE_NAMEprotected static FileOLD_OLD_CONFIG_FILEprotected static StringOLD_OLD_CONFIG_FILE_NAMEprotected static ConfigParseOptionsPARSE_OPTIONSprotected static ConfigRenderOptionsRENDER_OPTIONS
-
Constructor Summary
Constructors Modifier Constructor Description protectedConfiguration()
-
Method Summary
-
-
-
Field Detail
-
PARSE_OPTIONS
protected static final ConfigParseOptions PARSE_OPTIONS
-
RENDER_OPTIONS
protected static final ConfigRenderOptions RENDER_OPTIONS
-
CONFIG_FILE_NAME
protected static final String CONFIG_FILE_NAME
- See Also:
- Constant Field Values
-
OLD_CONFIG_FILE_NAME
protected static final String OLD_CONFIG_FILE_NAME
- See Also:
- Constant Field Values
-
OLD_OLD_CONFIG_FILE_NAME
protected static final String OLD_OLD_CONFIG_FILE_NAME
- See Also:
- Constant Field Values
-
CONFIG_FILE
protected static final File CONFIG_FILE
-
OLD_CONFIG_FILE
protected static final File OLD_CONFIG_FILE
-
OLD_OLD_CONFIG_FILE
protected static final File OLD_OLD_CONFIG_FILE
-
config
protected Config config
-
-
Method Detail
-
load
public static Configuration load()
Creates and loads the config. Also saves it so that all missing values exist!
Also set currentConfig to this config.- Returns:
- a configuration object, loaded from the config file.
-
get
public static Configuration get()
-
loadConfig
protected void loadConfig()
-
saveConfig
protected void saveConfig()
-
getHeader
protected static String getHeader()
-
root
public ConfigObject root()
-
origin
public ConfigOrigin origin()
-
withFallback
public Config withFallback(ConfigMergeable arg0)
- Specified by:
withFallbackin interfaceConfig- Specified by:
withFallbackin interfaceConfigMergeable
-
resolve
public Config resolve(ConfigResolveOptions arg0)
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin interfaceConfig
-
resolveWith
public Config resolveWith(Config arg0)
- Specified by:
resolveWithin interfaceConfig
-
resolveWith
public Config resolveWith(Config arg0, ConfigResolveOptions arg1)
- Specified by:
resolveWithin interfaceConfig
-
checkValid
public void checkValid(Config arg0, String... arg1)
- Specified by:
checkValidin interfaceConfig
-
hasPathOrNull
public boolean hasPathOrNull(String arg0)
- Specified by:
hasPathOrNullin interfaceConfig
-
entrySet
public Set<Map.Entry<String,ConfigValue>> entrySet()
-
getBoolean
public boolean getBoolean(String arg0)
- Specified by:
getBooleanin interfaceConfig
-
getObject
public ConfigObject getObject(String arg0)
-
getValue
public ConfigValue getValue(String arg0)
-
getMemorySize
public ConfigMemorySize getMemorySize(String arg0)
- Specified by:
getMemorySizein interfaceConfig
-
getMilliseconds
@Deprecated public Long getMilliseconds(String arg0)
Deprecated.- Specified by:
getMillisecondsin interfaceConfig
-
getNanoseconds
@Deprecated public Long getNanoseconds(String arg0)
Deprecated.- Specified by:
getNanosecondsin interfaceConfig
-
getDuration
public long getDuration(String arg0, TimeUnit arg1)
- Specified by:
getDurationin interfaceConfig
-
getDuration
public Duration getDuration(String arg0)
- Specified by:
getDurationin interfaceConfig
-
getTemporal
public TemporalAmount getTemporal(String arg0)
- Specified by:
getTemporalin interfaceConfig
-
getList
public ConfigList getList(String arg0)
-
getBooleanList
public List<Boolean> getBooleanList(String arg0)
- Specified by:
getBooleanListin interfaceConfig
-
getNumberList
public List<Number> getNumberList(String arg0)
- Specified by:
getNumberListin interfaceConfig
-
getIntList
public List<Integer> getIntList(String arg0)
- Specified by:
getIntListin interfaceConfig
-
getLongList
public List<Long> getLongList(String arg0)
- Specified by:
getLongListin interfaceConfig
-
getDoubleList
public List<Double> getDoubleList(String arg0)
- Specified by:
getDoubleListin interfaceConfig
-
getStringList
public List<String> getStringList(String arg0)
- Specified by:
getStringListin interfaceConfig
-
getEnumList
public <T extends Enum<T>> List<T> getEnumList(Class<T> arg0, String arg1)
- Specified by:
getEnumListin interfaceConfig
-
getObjectList
public List<? extends ConfigObject> getObjectList(String arg0)
- Specified by:
getObjectListin interfaceConfig
-
getConfigList
public List<? extends Config> getConfigList(String arg0)
- Specified by:
getConfigListin interfaceConfig
-
getAnyRefList
public List<?> getAnyRefList(String arg0)
- Specified by:
getAnyRefListin interfaceConfig
-
getBytesList
public List<Long> getBytesList(String arg0)
- Specified by:
getBytesListin interfaceConfig
-
getMemorySizeList
public List<ConfigMemorySize> getMemorySizeList(String arg0)
- Specified by:
getMemorySizeListin interfaceConfig
-
getMillisecondsList
@Deprecated public List<Long> getMillisecondsList(String arg0)
Deprecated.- Specified by:
getMillisecondsListin interfaceConfig
-
getNanosecondsList
@Deprecated public List<Long> getNanosecondsList(String arg0)
Deprecated.- Specified by:
getNanosecondsListin interfaceConfig
-
getDurationList
public List<Long> getDurationList(String arg0, TimeUnit arg1)
- Specified by:
getDurationListin interfaceConfig
-
getDurationList
public List<Duration> getDurationList(String arg0)
- Specified by:
getDurationListin interfaceConfig
-
withOnlyPath
public Config withOnlyPath(String arg0)
- Specified by:
withOnlyPathin interfaceConfig
-
withoutPath
public Config withoutPath(String arg0)
- Specified by:
withoutPathin interfaceConfig
-
withValue
public Config withValue(String arg0, ConfigValue arg1)
-
-