Skip to content

Commit

Permalink
remove unneeded backup saving mechanisms
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jan 4, 2025
1 parent d9d3920 commit 8ef5360
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

public class ConfigCore {
Expand Down Expand Up @@ -77,14 +75,4 @@ public static Mod getParentMod(Mod mod) {
}
return null;
}

static {
Executors.newSingleThreadScheduledExecutor()
.scheduleAtFixedRate(
ConfigCore::saveAll,
0,
30,
TimeUnit.SECONDS
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.config.data.ModType;
import cc.polyfrost.oneconfig.events.EventManager;
import cc.polyfrost.oneconfig.events.event.ShutdownEvent;
import cc.polyfrost.oneconfig.internal.command.OneConfigCommand;
import cc.polyfrost.oneconfig.internal.config.OneConfigConfig;
import cc.polyfrost.oneconfig.internal.config.Preferences;
Expand All @@ -38,7 +37,6 @@
import cc.polyfrost.oneconfig.internal.config.core.KeyBindHandler;
import cc.polyfrost.oneconfig.internal.gui.BlurHandler;
import cc.polyfrost.oneconfig.internal.hud.HudCore;
import cc.polyfrost.oneconfig.libs.eventbus.Subscribe;
import cc.polyfrost.oneconfig.libs.universal.ChatColor;
import cc.polyfrost.oneconfig.libs.universal.UChat;
import cc.polyfrost.oneconfig.libs.universal.UScreen;
Expand Down Expand Up @@ -261,9 +259,4 @@ private boolean handleForgeGui(ModContainer mod) {
return true;
}
//#endif

@Subscribe
private void onShutdown(ShutdownEvent event) {
ConfigCore.saveAll();
}
}

0 comments on commit 8ef5360

Please sign in to comment.