Example usage for net.minecraftforge.fml.common LoaderException LoaderException

List of usage examples for net.minecraftforge.fml.common LoaderException LoaderException

Introduction

In this page you can find the example usage for net.minecraftforge.fml.common LoaderException LoaderException.

Prototype

public LoaderException(String message) 

Source Link

Usage

From source file:info.servertools.core.command.CommandManager.java

License:Apache License

public CommandManager(final Path configFile) {
    this.configFile = configFile;
    try {//from   www . j  a va2  s . co m
        if (!Files.exists(configFile.getParent())) {
            Files.createDirectories(configFile.getParent());
        }
        if (!Files.exists(configFile)) {
            Files.createFile(configFile);
        }

        loader = HoconConfigurationLoader.builder().setFile(configFile.toFile()).build();
        node = loader.load(ConfigurationOptions.defaults().setHeader(HEADER));

    } catch (IOException e) {
        log.fatal("Failed to initialize command manager");
        throw new LoaderException(e);
    }
}