2016-04-02 04:08:40 +02:00
|
|
|
From d9b38b1ba8f921ac55766ecc47ff1cfe5a3b68c8 Mon Sep 17 00:00:00 2001
|
2016-03-26 18:45:15 +01: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-03-29 03:01:42 +02:00
|
|
|
index fe5084e..d77211a 100644
|
2016-03-26 18:45:15 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
@@ -553,6 +553,13 @@ 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);
|
|
|
|
--
|
2016-03-31 02:50:23 +02:00
|
|
|
2.8.0
|
2016-03-26 18:45:15 +01:00
|
|
|
|