2016-04-14 03:18:46 +00:00
|
|
|
From dc5551d29ec825888b85dbe989d28817473fc1bd Mon Sep 17 00:00:00 2001
|
2016-03-26 17:45:15 +00:00
|
|
|
From: Gabscap <sonstige.netzwerke@gabriel-paradzik.de>
|
|
|
|
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
|
2016-04-14 03:18:46 +00:00
|
|
|
index eb88228..0a3dc16 100644
|
2016-03-26 17:45:15 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2016-04-14 03:18:46 +00:00
|
|
|
@@ -554,6 +554,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2016-03-26 17:45:15 +00:00
|
|
|
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);
|
|
|
|
--
|
2016-03-31 00:50:23 +00:00
|
|
|
2.8.0
|
2016-03-26 17:45:15 +00:00
|
|
|
|