public class ConfigRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigRegistry.ConfigProxy |
static class |
ConfigRegistry.DefaultConfigurationHandler
The default
IConfigurationHandler for configs |
Modifier and Type | Field and Description |
---|---|
static java.util.List<ConfigRegistry.ConfigProxy> |
configs |
Constructor and Description |
---|
ConfigRegistry() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
deserialize(java.lang.String key,
java.lang.String string)
Deserializes the passed string with the passed key
|
static java.lang.String |
getKey(java.lang.Object o)
Gets the key for the passed object
|
static void |
init()
Only meant for internal use
|
static void |
onConfigReload(ConfigLoadEvent.Pre event) |
static void |
registerConfig(java.lang.Object config)
Registers a config with the registry
|
static void |
registerConfigProxy(IConfigProxy proxy)
Registers a config proxy
|
static java.lang.String |
serialize(java.lang.Object o)
Serializes the passed object into a string
|
public static java.util.List<ConfigRegistry.ConfigProxy> configs
public static void registerConfig(java.lang.Object config) throws ConfigException
config
- The config to registerConfigException
public static void registerConfigProxy(IConfigProxy proxy)
proxy
- The config proxypublic static void init()
public static java.lang.String getKey(java.lang.Object o)
o
- The objectpublic static java.lang.String serialize(java.lang.Object o) throws ConfigException
o
- The object to serializeConfigException
public static java.lang.Object deserialize(java.lang.String key, java.lang.String string) throws ConfigException
key
- The key representing the object typestring
- The serialized stringConfigException
public static void onConfigReload(ConfigLoadEvent.Pre event)