From 90009b87030e98f4c50f3651abc978f179691c00 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sun, 21 Jan 2024 00:45:19 +0100 Subject: [PATCH] Fixing WorldUtil (wrong constant usage) --- .../main/java/fr/pandacube/lib/paper/world/WorldUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/world/WorldUtil.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/world/WorldUtil.java index 760d783..c252c09 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/world/WorldUtil.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/world/WorldUtil.java @@ -32,10 +32,10 @@ public class WorldUtil { if (new File(worldFolder, "region").isDirectory()) return Environment.NORMAL; - if (new File(worldFolder, "DIM-1" + File.pathSeparator + "region").isDirectory()) + if (new File(worldFolder, "DIM-1" + File.separator + "region").isDirectory()) return Environment.NETHER; - if (new File(worldFolder, "DIM1" + File.pathSeparator + "region").isDirectory()) + if (new File(worldFolder, "DIM1" + File.separator + "region").isDirectory()) return Environment.THE_END; throw new IllegalStateException("Unable to determine the type of the world " + world + "."); @@ -48,8 +48,8 @@ public class WorldUtil { File file = switch (env) { case NORMAL -> new File(worldFolder, "region"); - case NETHER -> new File(worldFolder, "DIM-1" + File.pathSeparator + "region"); - case THE_END -> new File(worldFolder, "DIM1" + File.pathSeparator + "region"); + case NETHER -> new File(worldFolder, "DIM-1" + File.separator + "region"); + case THE_END -> new File(worldFolder, "DIM1" + File.separator + "region"); case CUSTOM -> throw new IllegalStateException("The provided world '" + world + "' has a custom Environment type. Unable to tell where the region are stored."); };