类 ConfigFileTypeHandler
java.lang.Object
net.minecraftforge.fml.config.ConfigFileTypeHandler
-
嵌套类概要
嵌套类修饰符和类型类说明private static class
private static final record
-
字段概要
字段修饰符和类型字段说明private static final ConfigFileTypeHandler
private static final ConfigFileTypeHandler
private static final Path
private static final org.slf4j.Logger
private static final ConfigFileTypeHandler
private final ModConfig.Type
private @Nullable com.electronwill.nightconfig.core.file.FileWatcher
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void
backUpConfig
(com.electronwill.nightconfig.core.file.CommentedFileConfig commentedFileConfig) static void
backUpConfig
(com.electronwill.nightconfig.core.file.CommentedFileConfig commentedFileConfig, int maxBackups) (专用程序包) static ConfigFileTypeHandler
get
(ModConfig.Type type) Gets the handler for the givenModConfig.Type
.(专用程序包) com.electronwill.nightconfig.core.file.FileWatcher
Gets theFileWatcher
for this handler, creating it if it doesn't exist and/or has been stopped.private static boolean
setupConfigFile
(ModConfig modConfig, Path file, com.electronwill.nightconfig.core.ConfigFormat<?> conf) (专用程序包) void
Stops theFileWatcher
for this handler, and sets it to null afterward.toString()
void
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
defaultConfigPath
-
CLIENT
-
COMMON
-
SERVER
-
type
-
watcher
@Nullable private @Nullable com.electronwill.nightconfig.core.file.FileWatcher watcher
-
-
构造器详细资料
-
ConfigFileTypeHandler
public ConfigFileTypeHandler() -
ConfigFileTypeHandler
-
-
方法详细资料
-
get
Gets the handler for the givenModConfig.Type
.- 参数:
type
- The type to get the handler for- 返回:
- The handler
-
getWatcher
com.electronwill.nightconfig.core.file.FileWatcher getWatcher()Gets theFileWatcher
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 theFileWatcher
for this handler, and sets it to null afterward. Use this instead ofFileWatcher.stop()
. -
reader
-
unload
-
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
-