summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/ChunkProviderServer.java2
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java7
-rw-r--r--src/main/java/net/minecraft/server/World.java1
3 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 0fa2b619..0b232fd1 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -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
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ee8dee66..a5d9d05c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -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
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index aacbef13..63ea1588 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -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;