mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-22 16:29:23 +00:00
# Conflicts: # divinemc-server/minecraft-patches/features/0003-Completely-remove-Mojang-profiler.patch # divinemc-server/minecraft-patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch # divinemc-server/paper-patches/features/0010-Smooth-teleport-API.patch
29 lines
1.3 KiB
Diff
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 218556fdaf4ea4993864e22530b4bad3335a535d..6a1ac6cdd0cf4f6a62216c264f6fd3cd25476254 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
|