mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +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
|
||||
public UUID getUUIDForWorld(File worldFolder) throws IOException {
|
||||
public UUID getUUIDForWorld(final File worldPath) throws IOException {
|
||||
//if it is a dimension folder
|
||||
if (!new File(worldFolder, "level.dat").exists()) {
|
||||
worldFolder = worldFolder.getParentFile();
|
||||
File worldFolder = worldPath;
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user