mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Merge pull request #149 from Gabscap/fix-teleport
Load chunks before player teleport - Fixes #147
This commit is contained in:
commit
4e19bc5653
@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
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);
|
||||
--
|
Loading…
Reference in New Issue
Block a user