+ Added localization support for commands

This commit is contained in:
Matthew Cech
2019-04-13 23:54:21 -07:00
parent fbd047849c
commit f00160714a
8 changed files with 340 additions and 190 deletions
+37
View File
@@ -0,0 +1,37 @@
package core;
import utils.GlobalLog;
import utils.LogFilter;
public class LocCommands extends LocBase
{
public static final String fileName = "locCommands.config";
public static final String function = "LocCommands.Stub";
private static LocCommands instance;
public LocCommands()
{
super(fileName, function);
GlobalLog.Log(LogFilter.Core, "Initializing " + this.getClass().getSimpleName());
if(instance == null)
{
instance = this;
UpdateLocFromDisk();
ScrapeAll();
SaveLocToDisk();
}
else
{
GlobalLog.Error(LogFilter.Core, "You can't have two of the following: " + this.getClass().getSimpleName());
}
}
public static String Stub(String toStub)
{
return instance.GetKey(toStub);
}
}