31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Sun, 10 Nov 2024 09:34:07 -0600
|
|
Subject: [PATCH] Smooth Teleports
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 95f0b3186e313c7fbd5c8531d52b82a69e525f94..f542265036bde4031c834e379a031d2821f32173 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -3721,6 +3721,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
String getClientBrandName();
|
|
// Paper end
|
|
|
|
+ // Slice start
|
|
+ /**
|
|
+ * This abuses some of how Minecraft works and allows teleporting a player to another world without
|
|
+ * triggering typical respawn packets. All of natural state of chunk resends, entity adds/removes, etc still
|
|
+ * happen but the visual "refresh" of a world change is hidden. Depending on the destination location/world,
|
|
+ * this can act as a "smooth teleport" to a world if the new world is very similar looking to the old one.
|
|
+ *
|
|
+ * @param location New location to teleport this Player to
|
|
+ */
|
|
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
+ void teleportWithoutRespawn(@NotNull Location location);
|
|
+ // Slice end
|
|
+
|
|
// Paper start - Teleport API
|
|
/**
|
|
* Sets the player's rotation.
|