+ Added FileMonitor feature for localization files to allow for active reloading
This commit is contained in:
@@ -3,6 +3,7 @@ package core;
|
||||
import java.util.ArrayList;
|
||||
import utils.GlobalLog;
|
||||
import utils.LogFilter;
|
||||
import utils.io.FileMonitor;
|
||||
import dataStructures.Pair;
|
||||
|
||||
// Performs the same localization for the strings associated with command names as
|
||||
@@ -27,6 +28,8 @@ public class LocCommands extends LocBase
|
||||
UpdateLocFromDisk();
|
||||
ScrapeAll();
|
||||
SaveLocToDisk();
|
||||
|
||||
fileMonitor = new FileMonitor(filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -47,4 +50,9 @@ public class LocCommands extends LocBase
|
||||
instance.stringStore.ForEach((pair) -> raw.add((String)((Pair<?, ?>)pair).First ));
|
||||
return raw;
|
||||
}
|
||||
|
||||
public static void Upkeep()
|
||||
{
|
||||
instance.Update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user