mirror of
https://github.com/GTNewHorizons/BetterCrashes.git
synced 2026-11-21 20:42:38 +00:00
paste.ubuntu.com requires a login for viewing the paste and that is annoying. mclo.gs is made for Minecraft logs. It does some special highlighting and censors certain information that is not relevant. Drawback is that logs are only valid for 90 days after last viewing.
53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
package vfyjxf.bettercrashes;
|
|
|
|
import java.io.File;
|
|
|
|
import net.minecraftforge.common.config.Configuration;
|
|
|
|
import cpw.mods.fml.common.Loader;
|
|
|
|
public class BetterCrashesConfig {
|
|
|
|
public static Configuration config;
|
|
|
|
public static final String GENERAL = "General";
|
|
|
|
public static boolean isGTNH = Loader.isModLoaded("dreamcraft");
|
|
public static int crashLogLimitClient = 30;
|
|
public static int crashLogLimitServer = 30;
|
|
public static String crashLogPasteService;
|
|
|
|
public static void init(File file) {
|
|
config = new Configuration(file);
|
|
syncConfig();
|
|
}
|
|
|
|
public static void syncConfig() {
|
|
config.setCategoryComment(GENERAL, "General config");
|
|
|
|
crashLogLimitClient = config.getInt(
|
|
"crashLogLimitClient",
|
|
GENERAL,
|
|
30,
|
|
0,
|
|
Integer.MAX_VALUE,
|
|
"Maximum number of crash logs generated per restart for client. Suppresses too many logs generated by continuous crashes.");
|
|
crashLogLimitServer = config.getInt(
|
|
"crashLogLimitServer",
|
|
GENERAL,
|
|
30,
|
|
0,
|
|
Integer.MAX_VALUE,
|
|
"Maximum number of crash logs generated per restart for server. Suppresses too many logs generated by continuous crashes.");
|
|
crashLogPasteService = config.getString(
|
|
"crashLogPasteService",
|
|
GENERAL,
|
|
"mclo.gs",
|
|
"Service to use for uploading crashlogs. Currently, only mclo.gs is currently supported.");
|
|
|
|
if (config.hasChanged()) {
|
|
config.save();
|
|
}
|
|
}
|
|
}
|