Implemented per world setting to keep the spawn in memory or not.
This commit is contained in:
@@ -49,7 +49,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
int l = j * 16 + 8 - chunkcoordinates.z;
|
||||
short short1 = 128;
|
||||
|
||||
if (k < -short1 || k > short1 || l < -short1 || l > short1) {
|
||||
if (k < -short1 || k > short1 || l < -short1 || l > short1 || !(this.world.keepSpawnInMemory)) { // CraftBukkit - added 'this.world.keepSpawnInMemory'
|
||||
this.unloadQueue.add(i, j); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,8 +232,9 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
||||
// CraftBukkit start
|
||||
for (int l = 0; l < this.worlds.size(); ++l) {
|
||||
// if (l == 0 || this.propertyManager.getBoolean("allow-nether", true)) {
|
||||
WorldServer worldserver = this.worlds.get(l);
|
||||
log.info("Preparing start region for level " + l + " (Seed: " + worldserver.getSeed() + ")");
|
||||
WorldServer worldserver = this.worlds.get(l);
|
||||
log.info("Preparing start region for level " + l + " (Seed: " + worldserver.getSeed() + ")");
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) {
|
||||
// CraftBukkit end
|
||||
ChunkCoordinates chunkcoordinates = worldserver.getSpawn();
|
||||
|
||||
@@ -260,7 +261,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
// } // CraftBukkit
|
||||
} // CraftBukkit
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
|
||||
@@ -83,6 +83,7 @@ public class World implements IBlockAccess {
|
||||
// CraftBukkit start
|
||||
private final CraftWorld world;
|
||||
public boolean pvpMode;
|
||||
public boolean keepSpawnInMemory = true;
|
||||
public ChunkGenerator generator;
|
||||
Chunk lastChunkAccessed;
|
||||
int lastXAccessed = Integer.MIN_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user