Allow loading Resources from zip files

Move Resources loading from String filenames to Paths
Add zip support
This commit is contained in:
AnimeGitB
2022-09-23 18:10:46 +09:30
parent a90455a7a4
commit fbc0219cba
9 changed files with 305 additions and 286 deletions

View File

@@ -26,7 +26,7 @@ public class ConfigContainer {
*/
public static void updateConfig() {
try { // Check if the server is using a legacy config.
JsonObject configObject = JsonUtils.loadToClass(Grasscutter.configFile.getPath(), JsonObject.class);
JsonObject configObject = JsonUtils.loadToClass(Grasscutter.configFile.toPath(), JsonObject.class);
if (!configObject.has("version")) {
Grasscutter.getLogger().info("Updating legacy ..");
Grasscutter.saveConfig(null);