From bcb293309d73ff57e1c2d471fe4afb066b9f3191 Mon Sep 17 00:00:00 2001 From: T14D3 <73843330+T14D3@users.noreply.github.com> Date: Sat, 11 Jan 2025 17:37:58 +0100 Subject: [PATCH] Fix saving --- src/main/java/de/t14d3/zones/RegionManager.java | 1 + .../java/de/t14d3/zones/integrations/WorldGuardImporter.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/de/t14d3/zones/RegionManager.java b/src/main/java/de/t14d3/zones/RegionManager.java index 8f83836..ee4af06 100644 --- a/src/main/java/de/t14d3/zones/RegionManager.java +++ b/src/main/java/de/t14d3/zones/RegionManager.java @@ -39,6 +39,7 @@ public RegionManager(Zones plugin, PermissionManager permissionManager) { } public void saveRegions() { + regionsConfig.set("regions", null); for (Map.Entry entry : loadedRegions.entrySet()) { String key = entry.getKey(); Region region = entry.getValue(); diff --git a/src/main/java/de/t14d3/zones/integrations/WorldGuardImporter.java b/src/main/java/de/t14d3/zones/integrations/WorldGuardImporter.java index dec5e3e..a187fbd 100644 --- a/src/main/java/de/t14d3/zones/integrations/WorldGuardImporter.java +++ b/src/main/java/de/t14d3/zones/integrations/WorldGuardImporter.java @@ -53,6 +53,7 @@ public void importRegions() { } plugin.getLogger().info("Imported " + count[0] + " regions from WorldGuard."); + plugin.getRegionManager().triggerSave(); }).start(); } }