diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-10-19 18:14:20 -0600 |
---|---|---|
committer | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-10-19 20:01:52 -0600 |
commit | 6430c868c779b5dfab4d82875959a0b3f4885d28 (patch) | |
tree | 037cd1836e7dd615263f3277e98e742ae784fb58 /src/main/java/net/minecraft/server/WorldServer.java | |
parent | 42e7fdee925a83cef82c6fba6cd39136cc476be1 (diff) | |
download | craftbukkit-6430c868c779b5dfab4d82875959a0b3f4885d28.tar craftbukkit-6430c868c779b5dfab4d82875959a0b3f4885d28.tar.gz craftbukkit-6430c868c779b5dfab4d82875959a0b3f4885d28.tar.lz craftbukkit-6430c868c779b5dfab4d82875959a0b3f4885d28.tar.xz craftbukkit-6430c868c779b5dfab4d82875959a0b3f4885d28.zip |
Remove redundant call to worldMaps.a(). Addresses BUKKIT-4828
The WorldMapCollection object for SecondaryWorldServers(Nether, End) is
shared with the main world, so saving it again for each SecondaryWorldServer
is redundant.
This commit removes the redundant call by checking if the WorldServer is an
instanceof SecondaryWorldServer before invoking worldMaps.a().
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldServer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldServer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index acc1eff8..73c1ac73 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -779,7 +779,11 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate protected void a() throws ExceptionWorldConflict { // CraftBukkit - added throws this.G(); this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().q()); - this.worldMaps.a(); + // CraftBukkit start - save worldMaps once, rather than once per shared world + if (!(this instanceof SecondaryWorldServer)) { + this.worldMaps.a(); + } + // CraftBukkit end } protected void a(Entity entity) { |