mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-18 03:25:07 +00:00
Eclipse Formatting (#114)
* Switch to Eclipse JDT formatting * Remove examplecode bloat * Add maven/CF dependency deobfuscation Credits to @FalsePattern * Apply spotless * Revert "Switch to Eclipse JDT formatting" This reverts commit 96104db65b4e2630637e9f05b3bbb8fb3a762531. * Rerun actions * spotlessApply (#115) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: Raven Szewczyk <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
7 files changed
+57
-125
No files matched your search
@@ -2,27 +2,15 @@ package com.myname.mymodid;
|
||||
|
||||
import java.io.File;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class Config {
|
||||
|
||||
private static class Defaults {
|
||||
public static final String greeting = "Hello World";
|
||||
}
|
||||
public static String greeting = "Hello World";
|
||||
|
||||
private static class Categories {
|
||||
public static final String general = "general";
|
||||
}
|
||||
|
||||
public static String greeting = Defaults.greeting;
|
||||
|
||||
public static void syncronizeConfiguration(File configFile) {
|
||||
public static void synchronizeConfiguration(File configFile) {
|
||||
Configuration configuration = new Configuration(configFile);
|
||||
configuration.load();
|
||||
|
||||
Property greetingProperty =
|
||||
configuration.get(Categories.general, "greeting", Defaults.greeting, "How shall I greet?");
|
||||
greeting = greetingProperty.getString();
|
||||
greeting = configuration.getString("greeting", Configuration.CATEGORY_GENERAL, greeting, "How shall I greet?");
|
||||
|
||||
if (configuration.hasChanged()) {
|
||||
configuration.save();
|
||||
|
||||
Reference in new issue
Block a user