Put instance and construct logic in the top of ConfServer.

This commit is contained in:
Olof Larsson 2013-04-09 13:18:05 +02:00
parent 1b0c0a4b72
commit e3d6a4ec8e

View File

@ -11,6 +11,26 @@ import com.massivecraft.factions.struct.Rel;
public class ConfServer 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<String> baseCommandAliases = new ArrayList<String>(); public final static transient List<String> baseCommandAliases = new ArrayList<String>();
// Colors // Colors
@ -340,18 +360,5 @@ public class ConfServer
spoutHealthBarColorUnderQuota.put(0.3d, "&c"); spoutHealthBarColorUnderQuota.put(0.3d, "&c");
spoutHealthBarColorUnderQuota.put(0.2d, "&4"); 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);
}
} }