From 0d36a0f70b0edb22d6cb47cacf9bdd3f89d7fcbf Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Sat, 24 Feb 2024 22:09:25 +0100 Subject: [PATCH] Fix region file watcher ignoring linear files --- .../bluemap/common/plugin/RegionFileWatchService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/RegionFileWatchService.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/RegionFileWatchService.java index 5bfdbfc4..6842addd 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/RegionFileWatchService.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/RegionFileWatchService.java @@ -33,6 +33,7 @@ import de.bluecolored.bluemap.core.util.FileHelper; import de.bluecolored.bluemap.core.world.World; import de.bluecolored.bluemap.core.world.mca.MCAWorld; +import de.bluecolored.bluemap.core.world.mca.region.RegionType; import java.io.IOException; import java.nio.file.*; @@ -109,8 +110,7 @@ public void run() { } private synchronized void updateRegion(String regionFileName) { - if (!regionFileName.endsWith(".mca")) return; - if (!regionFileName.startsWith("r.")) return; + if (RegionType.forFileName(regionFileName) == null) return; try { String[] filenameParts = regionFileName.split("\\.");