Java Code Examples for net.minecraftforge.common.config.Configuration#getString()

The following examples show how to use net.minecraftforge.common.config.Configuration#getString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Mobycraft.java    From mobycraft with Apache License 2.0 5 votes vote down vote up
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	File configFile = new File(event.getModConfigurationDirectory()
			.toString() + "/mobycraft/mobycraft.txt");

	config = new Configuration(configFile);
	config.load();
	config.getString(
			"docker-cert-path",
			"files",
			"File path",
			"The directory path of your Docker certificate (set using /docker path <path>); only used if DOCKER_CERT_PATH environment variable is not set");
	config.getString(
			"docker-host",
			"files",
			"Docker host IP",
			"The IP of your Docker host (set using /docker host <host>); only used if DOCKER_HOST environment variable is not set");
	config.getString(
			"start-pos",
			"container-building",
			"0, 0, 0",
			"The position - x, y, z - to start building containers at (set using /docker start_pos)");
	config.getString(
			"poll-rate",
			"container-building",
			"2",
			"The rate in seconds at which the containers will update (set using /docker poll_rate <rate in seconds>)");
	config.save();
}