This commit is contained in:
Olof Larsson 2016-01-19 08:08:05 +01:00
parent 2d4bfdcbf8
commit b0d7a8cfc2

View File

@ -70,12 +70,14 @@ public class Multiverse extends Entity<Multiverse>
{ {
ret = new HashSet<String>(); ret = new HashSet<String>();
this.uw.put(universe, ret); this.uw.put(universe, ret);
this.changed();
} }
return ret; return ret;
} }
public Set<String> delUniverse(String universe) public Set<String> delUniverse(String universe)
{ {
this.changed();
return this.uw.remove(universe); return this.uw.remove(universe);
} }
@ -113,6 +115,7 @@ public class Multiverse extends Entity<Multiverse>
Set<String> worlds = this.uw.get(universe); Set<String> worlds = this.uw.get(universe);
if (worlds == null) return false; if (worlds == null) return false;
worlds.clear(); worlds.clear();
this.changed();
return true; return true;
} }
@ -120,10 +123,11 @@ public class Multiverse extends Entity<Multiverse>
{ {
if (this.getUniverseForWorldName(worldName).equals(universe)) return false; if (this.getUniverseForWorldName(worldName).equals(universe)) return false;
this.removeWorld(worldName); this.removeWorld(worldName);
if (!universe.equals(MassiveCore.DEFAULT)) if ( ! universe.equals(MassiveCore.DEFAULT))
{ {
this.newUniverse(universe).add(worldName); this.newUniverse(universe).add(worldName);
} }
this.changed();
return true; return true;
} }
@ -161,7 +165,11 @@ public class Multiverse extends Entity<Multiverse>
{ {
for (Set<String> worldNames : this.uw.values()) for (Set<String> worldNames : this.uw.values())
{ {
if (worldNames.remove(worldName)) return true; if (worldNames.remove(worldName))
{
this.changed();
return true;
}
} }
return false; return false;
} }