java.lang.Object
me.desht.pneumaticcraft.common.config.subconfig.AuxConfigJson
All Implemented Interfaces:
IAuxConfig
Direct Known Subclasses:
AmadronPlayerOffers, ArmorFeatureStatus, ArmorHUDLayout, MicromissileDefaults, ProgWidgetConfig, ThirdPartyConfig

public abstract class AuxConfigJson extends Object implements IAuxConfig
  • Field Details

    • file

      protected File file
  • Method Details

    • preInit

      public void preInit(File file) throws IOException
      Description copied from interface: IAuxConfig
      Called during the pre-init phase, with the top-level mod config file name (pneumaticcraft.cfg). Pre-init configs are always loaded on both client and server (IAuxConfig.getSidedness() is ignored).
      Specified by:
      preInit in interface IAuxConfig
      Parameters:
      file - the config file name
      Throws:
      IOException - if there is a problem reading/writing any files
    • postInit

      public void postInit(File file) throws IOException
      Description copied from interface: IAuxConfig
      Called during the post-init phase; on the server, after the server has finished loading, and on the client, during the player connection process (PlayerEvent.PlayerLoggedInEvent).
      Specified by:
      postInit in interface IAuxConfig
      Parameters:
      file - the config file name
      Throws:
      IOException - if there is a problem reading/writing any files
    • writeToFile

      public void writeToFile() throws IOException
      Throws:
      IOException
    • tryWriteToFile

      public void tryWriteToFile()
    • writeToJson

      protected abstract void writeToJson(com.google.gson.JsonObject json)
    • readFromJson

      protected abstract void readFromJson(com.google.gson.JsonObject json)