mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
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().
This commit is contained in:
parent
42e7fdee92
commit
6430c868c7
@ -779,7 +779,11 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
|||||||
protected void a() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
protected void a() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
||||||
this.G();
|
this.G();
|
||||||
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().q());
|
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) {
|
protected void a(Entity entity) {
|
||||||
|
Loading…
Reference in New Issue
Block a user