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
    Constructor
    Description
    BaseRPCConfig(String configName, String langCode)
    Create a new Config class
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Allows you to add additional information or set default config values before the file is created
    int
    Used to determine if the config structure needs to be upgraded
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseRPCConfig

      public BaseRPCConfig(String configName, String langCode)
      Create a new Config class
      Parameters:
      configName - - The name of the config, excluding extension
      langCode - - Language Code to append to the file name
  • Method Details

    • registerAndSetup

      public void registerAndSetup(S config)
      This method has to be called in the config constructor. This creates or upgrades the config file as needed
      Overrides:
      registerAndSetup in class com.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