Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Load chunk before player teleport - Fixes #147
Dieser Commit ist enthalten in:
Ursprung
79c54e4434
Commit
f356b447b7
27
Spigot-Server-Patches/0110-Load-chunk-before-player-teleport.patch
Normale Datei
27
Spigot-Server-Patches/0110-Load-chunk-before-player-teleport.patch
Normale Datei
@ -0,0 +1,27 @@
|
||||
From faf78a71681822c4466de19eeb9f92f2df454e29 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 8b1daaf..0e56151 100644
|
||||
--- 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);
|
||||
--
|
||||
2.7.4
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren