Put instance and construct logic in the top of ConfServer.
This commit is contained in:
		| @@ -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); |  | ||||||
| 	} |  | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 
				 Olof Larsson
					Olof Larsson