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:
@@ -66,6 +66,7 @@ public class IrisWorlds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public KMap<String, String> getWorlds() {
|
public KMap<String, String> getWorlds() {
|
||||||
|
clean();
|
||||||
return readBukkitWorlds().put(worlds);
|
return readBukkitWorlds().put(worlds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,8 +77,7 @@ public class IrisWorlds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Stream<IrisDimension> getDimensions() {
|
public Stream<IrisDimension> getDimensions() {
|
||||||
return readBukkitWorlds()
|
return getWorlds()
|
||||||
.put(worlds)
|
|
||||||
.entrySet()
|
.entrySet()
|
||||||
.stream()
|
.stream()
|
||||||
.map(entry -> Iris.loadDimension(entry.getKey(), entry.getValue()))
|
.map(entry -> Iris.loadDimension(entry.getKey(), entry.getValue()))
|
||||||
|
|||||||
@@ -1705,6 +1705,7 @@ public class IO {
|
|||||||
action.accept(out);
|
action.accept(out);
|
||||||
}
|
}
|
||||||
Files.copy(temp.toPath(), Channels.newOutputStream(target));
|
Files.copy(temp.toPath(), Channels.newOutputStream(target));
|
||||||
|
target.truncate(temp.length());
|
||||||
} finally {
|
} finally {
|
||||||
temp.delete();
|
temp.delete();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user