Skip to content

Commit 5e8e938

Browse files
authored
Merge pull request #3440 from Multiverse/fix/26.1-folders-lowercased
Fix world folder being lowercased due to namespace changes in 26.1
2 parents b9e07a8 + 4a16fa2 commit 5e8e938

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/org/mvplugins/multiverse/core/world/helpers/WorldNameChecker.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,16 @@ public FolderStatus checkFolder(@Nullable String worldName) {
120120
if (worldName == null) {
121121
return FolderStatus.DOES_NOT_EXIST;
122122
}
123-
File worldFolder = BukkitCompatibility.getWorldFoldersDirectory().resolve(worldName).toFile();
123+
124124
if (BukkitCompatibility.isUsingNewDimensionStorage()) {
125125
File oldWorldFolder = Bukkit.getWorldContainer().toPath().resolve(worldName).toFile();
126126
if (checkFolder(oldWorldFolder) == FolderStatus.VALID) {
127127
return FolderStatus.REQUIRES_MIGRATION;
128128
}
129+
worldName = worldName.toLowerCase(Locale.ENGLISH); // namespace is case-insensitive and stored as lowercase
129130
}
130131

132+
File worldFolder = BukkitCompatibility.getWorldFoldersDirectory().resolve(worldName).toFile();
131133
return checkFolder(worldFolder);
132134
}
133135

0 commit comments

Comments
 (0)