mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-08-17 16:55:57 +00:00
add getter method to IrisWorlds
This commit is contained in:
parent
501c426302
commit
70130e976d
@ -29,7 +29,7 @@ public class IrisWorlds {
|
|||||||
|
|
||||||
private IrisWorlds(KMap<String, String> worlds) {
|
private IrisWorlds(KMap<String, String> worlds) {
|
||||||
this.worlds = worlds;
|
this.worlds = worlds;
|
||||||
readBukkitWorlds().forEach(this::put);
|
readBukkitWorlds().forEach(this::put0);
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,10 +55,18 @@ public class IrisWorlds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void put(String name, String type) {
|
public void put(String name, String type) {
|
||||||
|
put0(name, type);
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void put0(String name, String type) {
|
||||||
String old = worlds.put(name, type);
|
String old = worlds.put(name, type);
|
||||||
if (!type.equals(old))
|
if (!type.equals(old))
|
||||||
dirty = true;
|
dirty = true;
|
||||||
save();
|
}
|
||||||
|
|
||||||
|
public KMap<String, String> getWorlds() {
|
||||||
|
return readBukkitWorlds().put(worlds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Stream<IrisData> getPacks() {
|
public Stream<IrisData> getPacks() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user