From 32ebb2e2e1a1750d6ded05d1596fcd183d513209 Mon Sep 17 00:00:00 2001
From: CraftBukkit/Spigot <noreply+git-craftbukkit@papermc.io>
Date: Tue, 8 Feb 2011 14:26:55 +0000
Subject: [PATCH] Added loadChunk, unloadChunk and unloadChunkRequest.

By: Dinnerbone <dinnerbone@dinnerbone.com>
---
 .../org/bukkit/craftbukkit/CraftWorld.java    | 26 ++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2e90063e38..855b309d28 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -75,7 +75,31 @@ public class CraftWorld implements World {
     }
 
     public void loadChunk(int x, int z) {
-         world.A.d(x, z);
+        loadChunk(x, z, true);
+    }
+
+    public boolean loadChunk(int x, int z, boolean generate) {
+        return world.A.loadChunk(x, z, generate) != null;
+    }
+
+    public boolean unloadChunk(int x, int z) {
+        return unloadChunk(x, z, true);
+    }
+
+    public boolean unloadChunk(int x, int z, boolean save) {
+        return unloadChunk(x, z, save, false);
+    }
+
+    public boolean unloadChunk(int x, int z, boolean save, boolean safe) {
+        return world.A.unloadChunk(x, z, save, safe);
+    }
+    
+    public boolean unloadChunkRequest(int x, int z) {
+        return unloadChunkRequest(x, z, true);
+    }
+    
+    public boolean unloadChunkRequest(int x, int z, boolean safe) {
+        return world.A.unloadChunkRequest(x, z, safe);
     }
 
     public boolean isChunkLoaded(Chunk chunk) {