mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Fix resourcepack worlds not being detected on spigot
This commit is contained in:
parent
34d89ae0fe
commit
93ae59708e
@ -168,10 +168,15 @@ public void unregisterAllListeners() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UUID getUUIDForWorld(File worldFolder) throws IOException {
|
public UUID getUUIDForWorld(final File worldPath) throws IOException {
|
||||||
//if it is a dimension folder
|
//if it is a dimension folder
|
||||||
if (!new File(worldFolder, "level.dat").exists()) {
|
File worldFolder = worldPath;
|
||||||
worldFolder = worldFolder.getParentFile();
|
while (!new File(worldFolder, "level.dat").exists()) {
|
||||||
|
File parent = worldFolder.getParentFile();
|
||||||
|
if (parent != null)
|
||||||
|
worldFolder = parent;
|
||||||
|
else
|
||||||
|
throw new IOException("Unable to find a level.dat for world: '" + worldPath + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
final File normalizedWorldFolder = worldFolder.getCanonicalFile();
|
final File normalizedWorldFolder = worldFolder.getCanonicalFile();
|
||||||
|
Loading…
Reference in New Issue
Block a user