From e3d6a4ec8ea76cdbdcf57d896cdf5b64d3b34255 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Tue, 9 Apr 2013 13:18:05 +0200 Subject: [PATCH] Put instance and construct logic in the top of ConfServer. --- src/com/massivecraft/factions/ConfServer.java | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/com/massivecraft/factions/ConfServer.java b/src/com/massivecraft/factions/ConfServer.java index 5d0c8b2a..df1df9ca 100644 --- a/src/com/massivecraft/factions/ConfServer.java +++ b/src/com/massivecraft/factions/ConfServer.java @@ -11,6 +11,26 @@ import com.massivecraft.factions.struct.Rel; public class ConfServer { + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static transient ConfServer i = new ConfServer(); + public static ConfServer get() { return i; } + + public static void load() + { + Factions.get().persist.loadOrSaveDefault(i, ConfServer.class, "conf"); + } + public static void save() + { + Factions.get().persist.save(i); + } + + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public final static transient List baseCommandAliases = new ArrayList(); // Colors @@ -340,18 +360,5 @@ public class ConfServer spoutHealthBarColorUnderQuota.put(0.3d, "&c"); spoutHealthBarColorUnderQuota.put(0.2d, "&4"); } - - // -------------------------------------------- // - // Persistance - // -------------------------------------------- // - private static transient ConfServer i = new ConfServer(); - public static void load() - { - Factions.get().persist.loadOrSaveDefault(i, ConfServer.class, "conf"); - } - public static void save() - { - Factions.get().persist.save(i); - } }