9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-24 01:09:29 +00:00
Files
DivineMC/divinemc-server/paper-patches/features/0010-Smooth-teleport-API.patch
NONPLAYT 72a64c2914 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@c29e75fe Updated Upstream (Paper)
2025-07-31 14:28:05 +03:00

29 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sun, 29 Jun 2025 15:09:57 +0300
Subject: [PATCH] Smooth teleport API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4e24a177aed7eda0899b4a1a1e308f02a16c5718..f62e0cd8f7910444439ff3285f2455eb928d4c03 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1405,6 +1405,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
// Paper end - Teleportation API
}
+ // DivineMC start - Smooth teleport API
+ @Override
+ public boolean teleportWithoutRespawn(Location location) {
+ ServerPlayer serverPlayer = getHandle();
+ serverPlayer.smoothWorldTeleport = true;
+ boolean teleportResult = teleport(location);
+ serverPlayer.smoothWorldTeleport = false;
+ return teleportResult;
+ }
+ // DivineMC end - Smooth teleport API
+
@Override
public boolean teleport(Location location, PlayerTeleportEvent.TeleportCause cause) {
// Paper start - Teleport API