9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/divinemc-server/paper-patches/features/0017-Smooth-teleport-API.patch
NONPLAYT 624e45d701 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@09ea9cb9 fix mobs not burning in daylight (#1689)
PurpurMC/Purpur@4d5a8e6e Updated Upstream (Paper)
2025-07-07 03:11:24 +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 fda15b81d2405179261fa6fa76c3ec8f7ad6eaf5..9ad1c87e3030f2d153f941581cc58840f0903535 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1455,6 +1455,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