2016-03-16 07:21:39 +00:00
|
|
|
From 39ecc8e9af0f15467844d39ef9065aad2d37ce3d Mon Sep 17 00:00:00 2001
|
2015-11-16 01:46:34 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
2016-02-29 23:09:49 +00:00
|
|
|
Date: Wed, 2 Mar 2016 23:55:20 -0600
|
2015-11-16 01:46:34 +00:00
|
|
|
Subject: [PATCH] Don't create a chunk just to unload it
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2016-03-12 02:13:31 +00:00
|
|
|
index f32d974..40338c0 100644
|
2015-11-16 01:46:34 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2016-03-12 02:13:31 +00:00
|
|
|
@@ -205,7 +205,12 @@ public class CraftWorld implements World {
|
2015-11-16 01:46:34 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-02-29 23:09:49 +00:00
|
|
|
- net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z);
|
|
|
|
+ // Paper start - Don't create a chunk just to unload it
|
|
|
|
+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z);
|
2015-11-16 01:46:34 +00:00
|
|
|
+ if (chunk == null) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
2016-02-29 23:09:49 +00:00
|
|
|
+ // Paper end
|
2015-11-16 01:46:34 +00:00
|
|
|
if (chunk.mustSave) { // If chunk had previously been queued to save, must do save to avoid loss of that data
|
|
|
|
save = true;
|
|
|
|
}
|
|
|
|
--
|
2016-02-29 23:09:49 +00:00
|
|
|
2.7.2
|
2015-11-16 01:46:34 +00:00
|
|
|
|