= Format revision

This commit is contained in:
Matthew Cech
2019-06-20 00:08:21 -07:00
parent 8ae6d4adc3
commit 99cd76de83
6 changed files with 26 additions and 37 deletions
+19 -5
View File
@@ -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);
}
}