mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-10 19:58:03 +01:00
Postpone settings load
This commit is contained in:
parent
51fd8dad1d
commit
4235543dcb
@ -64,13 +64,16 @@ public class ViaFabricPlus {
|
||||
directory.mkdir();
|
||||
ClassLoaderPriorityUtil.loadOverridingJars(directory); // Load overriding jars first so other code can access the new classes
|
||||
|
||||
settingsManager = new SettingsManager();
|
||||
saveManager = new SaveManager(settingsManager);
|
||||
|
||||
ClientsideFixes.init(); // Init clientside related fixes
|
||||
loadingFuture = ProtocolTranslator.init(directory); // Init ViaVersion protocol translator platform
|
||||
|
||||
PostGameLoadCallback.EVENT.register(() -> loadingFuture.join()); // Block game loading until ViaVersion has loaded
|
||||
settingsManager = new SettingsManager();
|
||||
saveManager = new SaveManager(settingsManager);
|
||||
|
||||
PostGameLoadCallback.EVENT.register(() -> {
|
||||
loadingFuture.join();
|
||||
saveManager.init();
|
||||
}); // Block game loading until ViaVersion has loaded
|
||||
}
|
||||
|
||||
public static ViaFabricPlus global() {
|
||||
|
@ -43,7 +43,9 @@ public class SaveManager {
|
||||
settingsSave = new SettingsSave(settingsManager),
|
||||
accountsSave = new AccountsSave()
|
||||
);
|
||||
}
|
||||
|
||||
public void init() {
|
||||
// Load save files
|
||||
for (AbstractSave save : saves) {
|
||||
save.init();
|
||||
|
Loading…
Reference in New Issue
Block a user