mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Allow loading Resources from zip files
Move Resources loading from String filenames to Paths Add zip support
This commit is contained in:
@@ -45,7 +45,6 @@ import javax.annotation.Nullable;
|
||||
import java.io.*;
|
||||
import java.util.Calendar;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.DATA;
|
||||
import static emu.grasscutter.config.Configuration.SERVER;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@@ -203,7 +202,7 @@ public final class Grasscutter {
|
||||
|
||||
// If the file already exists, we attempt to load it.
|
||||
try {
|
||||
config = JsonUtils.loadToClass(configFile.getPath(), ConfigContainer.class);
|
||||
config = JsonUtils.loadToClass(configFile.toPath(), ConfigContainer.class);
|
||||
} catch (Exception exception) {
|
||||
getLogger().error("There was an error while trying to load the configuration from config.json. Please make sure that there are no syntax errors. If you want to start with a default configuration, delete your existing config.json.");
|
||||
System.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user