From 3ed9c2917e3b27308cd344f401ebed9b1293d332 Mon Sep 17 00:00:00 2001 From: Gabscap Date: Sat, 26 Mar 2016 18:45:15 +0100 Subject: [PATCH] Load chunk before player teleport - Fixes #147 --- .../Load-chunk-before-player-teleport.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Spigot-Server-Patches/Load-chunk-before-player-teleport.patch diff --git a/Spigot-Server-Patches/Load-chunk-before-player-teleport.patch b/Spigot-Server-Patches/Load-chunk-before-player-teleport.patch new file mode 100644 index 0000000000..9e309fc56b --- /dev/null +++ b/Spigot-Server-Patches/Load-chunk-before-player-teleport.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Gabscap +Date: Sat, 26 Mar 2016 18:41:22 +0100 +Subject: [PATCH] Load chunk before player teleport + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + getHandle().closeInventory(); + } + ++ // Paper start - Load chunk before player teleport ++ org.bukkit.Chunk chunk = to.getChunk(); ++ if (!chunk.isLoaded()) { ++ chunk.load(); ++ } ++ // Paper end ++ + // Check if the fromWorld and toWorld are the same. + if (fromWorld == toWorld) { + entity.playerConnection.teleport(to); +-- \ No newline at end of file