Class BaseRPCConfig<S extends BaseRPCConfig>
java.lang.Object
com.hypherionmc.craterlib.core.config.AbstractConfig<S>
com.hypherionmc.simplerpc.config.base.BaseRPCConfig<S>
- Direct Known Subclasses:
ClientConfig,ReplayModConfig,ServerEntriesConfig
public abstract class BaseRPCConfig<S extends BaseRPCConfig>
extends com.hypherionmc.craterlib.core.config.AbstractConfig<S>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAllows you to add additional information or set default config values before the file is createdintUsed to determine if the config structure needs to be upgradedvoidregisterAndSetup(S config) This method has to be called in the config constructor.Methods inherited from class com.hypherionmc.craterlib.core.config.AbstractConfig
configReloaded, getConfigFormat, getConfigName, getConfigPath, getModId, getNetworkID, isWasSaveCalled, migrateConfig, readConfig, saveConfig, setConfigFormat
-
Constructor Details
-
BaseRPCConfig
Create a new Config class- Parameters:
configName- - The name of the config, excluding extensionlangCode- - Language Code to append to the file name
-
-
Method Details
-
registerAndSetup
This method has to be called in the config constructor. This creates or upgrades the config file as needed- Overrides:
registerAndSetupin classcom.hypherionmc.craterlib.core.config.AbstractConfig<S extends BaseRPCConfig>- Parameters:
config- - The config class to use
-
appendAdditional
public void appendAdditional()Allows you to add additional information or set default config values before the file is created -
getConfigVersion
public int getConfigVersion()Used to determine if the config structure needs to be upgraded- Returns:
- - The current config version of the file
-