类 ConfigFileTypeHandler

java.lang.Object
net.minecraftforge.fml.config.ConfigFileTypeHandler

public class ConfigFileTypeHandler extends Object
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • defaultConfigPath

      private static final Path defaultConfigPath
    • CLIENT

      private static final ConfigFileTypeHandler CLIENT
    • COMMON

      private static final ConfigFileTypeHandler COMMON
    • SERVER

      private static final ConfigFileTypeHandler SERVER
    • type

      @Nullable private final ModConfig.Type type
    • watcher

      @Nullable private @Nullable com.electronwill.nightconfig.core.file.FileWatcher watcher
  • 构造器详细资料

    • ConfigFileTypeHandler

      public ConfigFileTypeHandler()
    • ConfigFileTypeHandler

      private ConfigFileTypeHandler(@Nullable ModConfig.Type type)
  • 方法详细资料

    • get

      Gets the handler for the given ModConfig.Type.
      参数:
      type - The type to get the handler for
      返回:
      The handler
    • getWatcher

      com.electronwill.nightconfig.core.file.FileWatcher getWatcher()
      Gets the FileWatcher for this handler, creating it if it doesn't exist and/or has been stopped.
      返回:
      The watcher
      API Note:
      This is package-private so modders can't just call FileWatcher.stop() and fuck up everything.
    • stopWatcher

      void stopWatcher()
      Stops the FileWatcher for this handler, and sets it to null afterward. Use this instead of FileWatcher.stop().
    • reader

      public Function<ModConfig,com.electronwill.nightconfig.core.file.CommentedFileConfig> reader(Path configBasePath)
    • unload

      public void unload(Path configBasePath, ModConfig config)
    • setupConfigFile

      private static boolean setupConfigFile(ModConfig modConfig, Path file, com.electronwill.nightconfig.core.ConfigFormat<?> conf) throws IOException
      抛出:
      IOException
    • backUpConfig

      public static void backUpConfig(com.electronwill.nightconfig.core.file.CommentedFileConfig commentedFileConfig)
    • backUpConfig

      public static void backUpConfig(com.electronwill.nightconfig.core.file.CommentedFileConfig commentedFileConfig, int maxBackups)
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object