9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 15:09:18 +00:00

remove old worlds from cache before retrieving

This commit is contained in:
Julian Krings
2025-09-10 16:15:01 +02:00
parent a8ee321eb8
commit e5908285af
2 changed files with 3 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ public class IrisWorlds {
}
public KMap<String, String> getWorlds() {
clean();
return readBukkitWorlds().put(worlds);
}
@@ -76,8 +77,7 @@ public class IrisWorlds {
}
public Stream<IrisDimension> getDimensions() {
return readBukkitWorlds()
.put(worlds)
return getWorlds()
.entrySet()
.stream()
.map(entry -> Iris.loadDimension(entry.getKey(), entry.getValue()))

View File

@@ -1705,6 +1705,7 @@ public class IO {
action.accept(out);
}
Files.copy(temp.toPath(), Channels.newOutputStream(target));
target.truncate(temp.length());
} finally {
temp.delete();
}