crwdns132077:0crwdne132077:0

crwdns132079:0:javadoc:crwdne132079:0

crwdns132081:0crwdne132081:0

Note

crwdns132083:0:javadoc:crwdnd132083:0:doc:crwdne132083:0

crwdns132085:0:javadoc:crwdne132085:0

import java.nio.file.Path;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
import ninja.leaping.configurate.loader.ConfigurationLoader;

Path potentialFile = getConfigPath();
ConfigurationLoader<CommentedConfigurationNode> loader =
  HoconConfigurationLoader.builder().setPath(potentialFile).build();

crwdns132087:0:doc:crwdne132087:0

crwdns132089:0crwdne132089:0

crwdns132091:0crwdne132091:0

crwdns132093:0crwdne132093:0

crwdns132095:0crwdne132095:0

crwdns132097:0:javadoc:crwdne132097:0

import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ConfigurationOptions;

Path potentialFile = getConfigPath();
ConfigurationLoader<CommentedConfigurationNode> loader = HoconConfigurationLoader.builder().setPath(potentialFile).build();
ConfigurationNode rootNode = loader.createEmptyNode(ConfigurationOptions.defaults());

crwdns132099:0:javadoc:crwdne132099:0

crwdns132101:0crwdne132101:0

import java.io.IOException;

Path potentialFile = getConfigPath();
ConfigurationLoader<CommentedConfigurationNode> loader = HoconConfigurationLoader.builder().setPath(potentialFile).build();
ConfigurationNode rootNode;
try {
    rootNode = loader.load();
} catch(IOException e) {
    // error
}

crwdns132103:0crwdne132103:0

crwdns132105:0crwdne132105:0

crwdns132107:0crwdne132107:0

try {
    loader.save(rootNode);
} catch(IOException e) {
    // error
}

crwdns132109:0crwdne132109:0

crwdns132111:0crwdne132111:0

import java.net.URL;

URL jarConfigFile = Sponge.getAssetManager().getAsset("defaultConfig.conf").get().getUrl();
ConfigurationLoader<CommentedConfigurationNode> loader =
  HoconConfigurationLoader.builder().setURL(jarConfigFile).build();

crwdns132113:0:javadoc:crwdnd132113:0:doc:crwdne132113:0