add getter method to IrisWorlds

This commit is contained in:
Julian Krings 2025-07-28 13:53:11 +02:00
parent 501c426302
commit 70130e976d
No known key found for this signature in database
GPG Key ID: 208C6E08C3B718D2

View File

@ -29,7 +29,7 @@ public class IrisWorlds {
private IrisWorlds(KMap<String, String> worlds) {
this.worlds = worlds;
readBukkitWorlds().forEach(this::put);
readBukkitWorlds().forEach(this::put0);
save();
}
@ -55,10 +55,18 @@ public class IrisWorlds {
}
public void put(String name, String type) {
put0(name, type);
save();
}
private void put0(String name, String type) {
String old = worlds.put(name, type);
if (!type.equals(old))
dirty = true;
save();
}
public KMap<String, String> getWorlds() {
return readBukkitWorlds().put(worlds);
}
public Stream<IrisData> getPacks() {