= Format revision
This commit is contained in:
+19
-5
@@ -3,25 +3,39 @@ import java.nio.file.Path;
|
||||
|
||||
import utils.GlobalLog;
|
||||
import utils.LogFilter;
|
||||
import utils.io.MonitoredFile;
|
||||
import utils.io.FileMonitor;
|
||||
|
||||
public class Config
|
||||
{
|
||||
private static final Path filepath = Constants.AssetDirectory + Constants.ConfigFilename;
|
||||
MonitoredFile configFile;
|
||||
private static final String filepath = Constants.AssetDirectory + Constants.ConfigFilename;
|
||||
FileMonitor configFile;
|
||||
|
||||
Config instance;
|
||||
public static Config instance;
|
||||
|
||||
// Accessable config related things
|
||||
public LocStrings locStrings;
|
||||
public LocCommands locCommands;
|
||||
public CommandEnabler commandEnabler;
|
||||
|
||||
public Config()
|
||||
{
|
||||
if(instance == null)
|
||||
{
|
||||
configFile = new MonitoredFile(filepath);
|
||||
// Start by reading from things that are external. Because
|
||||
// we require these things to be resolved before the rest of the application,
|
||||
// we place them here.
|
||||
configFile = new FileMonitor(filepath);
|
||||
|
||||
commandEnabler = new CommandEnabler();
|
||||
locStrings = new LocStrings();
|
||||
locCommands = new LocCommands();
|
||||
|
||||
instance = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalLog.error(LogFilter.Core, "You can't have two of the following: " + this.getClass().getSimpleName());
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user