From 2e4a3e315034e59e9f80f8ca4ecd1dc8abf7ed62 Mon Sep 17 00:00:00 2001 From: cnlimiter Date: Wed, 20 Dec 2023 20:04:13 +0800 Subject: [PATCH] =?UTF-8?q?+=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/nova/committee/atom/sweep/ISweep.java | 15 +++++++++------ .../java/nova/committee/atom/sweep/Static.java | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/nova/committee/atom/sweep/ISweep.java b/src/main/java/nova/committee/atom/sweep/ISweep.java index a63c940..ed2ee6c 100644 --- a/src/main/java/nova/committee/atom/sweep/ISweep.java +++ b/src/main/java/nova/committee/atom/sweep/ISweep.java @@ -8,13 +8,16 @@ import nova.committee.atom.sweep.init.handler.SweepHandler; import nova.committee.atom.sweep.util.FileUtils; -import static nova.committee.atom.sweep.Static.CONFIG_FOLDER; +import static nova.committee.atom.sweep.Static.ATOM_FOLDER; +import static nova.committee.atom.sweep.Static.SWEEP_FOLDER; public class ISweep { public ISweep() { - CONFIG_FOLDER = FMLPaths.GAMEDIR.get().resolve("atom"); - FileUtils.checkFolder(CONFIG_FOLDER); - Static.CONFIG_FILE = CONFIG_FOLDER.resolve("config.toml"); + ATOM_FOLDER = FMLPaths.GAMEDIR.get().resolve("atom"); + FileUtils.checkFolder(ATOM_FOLDER); + SWEEP_FOLDER = ATOM_FOLDER.resolve("sweep"); + FileUtils.checkFolder(SWEEP_FOLDER); + Static.CONFIG_FILE = SWEEP_FOLDER.resolve("config.toml"); Static.isLuckPerms = ModList.get().isLoaded("luckperms"); } @@ -28,11 +31,11 @@ public void onServerStarted(MinecraftServer server) { } public void onServerStopping(MinecraftServer server) { - Sweeper.INSTANCE.stopSweep(); + } public void onServerStopped(MinecraftServer server) { - + Sweeper.INSTANCE.stopSweep(); } public void onServerTick(TickEvent.ServerTickEvent event) { diff --git a/src/main/java/nova/committee/atom/sweep/Static.java b/src/main/java/nova/committee/atom/sweep/Static.java index 63afd5a..2d9ebec 100644 --- a/src/main/java/nova/committee/atom/sweep/Static.java +++ b/src/main/java/nova/committee/atom/sweep/Static.java @@ -38,7 +38,8 @@ public class Static { public static final String MOD_ID = "atomsweep"; public static final Logger LOGGER = LogManager.getLogger(MOD_ID); public static Path CONFIG_FILE; - public static Path CONFIG_FOLDER; + public static Path ATOM_FOLDER; + public static Path SWEEP_FOLDER; public static MinecraftServer SERVER = ServerLifecycleHooks.getCurrentServer(); public static boolean isLuckPerms = false;