mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-30 20:39:21 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@3efaf477 Add API for client-side signs (#11903) PaperMC/Paper@a3909f54 [ci/skip] Fix bad format for jd @link (#12581) PaperMC/Paper@7774243d Add plugin details to zip file errors (#12580) PaperMC/Paper@220b57ad Fixs and Improvements for EndermanEscapeEvent (#12570) PaperMC/Paper@b8fe22c9 Do not call EntityRemoveEvent during worldgen (#12588) PaperMC/Paper@ee3b4053 Replace spigot check with generation check PaperMC/Paper@84ee4249 Add Map filled event (#12574) PaperMC/Paper@b9d6ba24 Expose more data for MusicInstrument (#12415) PaperMC/Paper@a033e3b9 Fix ancient player custom name converter
49 lines
2.3 KiB
Diff
49 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Sat, 13 Aug 2022 08:58:21 -0500
|
|
Subject: [PATCH] Slice: Smooth Teleports
|
|
|
|
Original license: MIT
|
|
Original project: https://github.com/Cryptite/Slice
|
|
|
|
Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index d17f7881e55d61c2137f29d0b903016958b05b5d..09f70aa4d206a1b7fc5f3274f34c6885a9e2d60d 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -3716,6 +3716,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
String getClientBrandName();
|
|
// Paper end
|
|
|
|
+ /**
|
|
+ * This abuses some of how Minecraft works and attempts to teleport 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
|
|
+ * @deprecated use {@link #teleportWithoutRespawnOptionally(Location)}
|
|
+ */
|
|
+ // Slice start
|
|
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
+ @Deprecated(since = "1.21.1", forRemoval = true)
|
|
+ void teleportWithoutRespawn(Location location);
|
|
+
|
|
+ /**
|
|
+ * This abuses some of how Minecraft works and attempts to teleport 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
|
|
+ * @return Whether the teleport was successful
|
|
+ */
|
|
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
|
+ boolean teleportWithoutRespawnOptionally(Location location);
|
|
+ // Slice end
|
|
+
|
|
// Paper start - Teleport API
|
|
/**
|
|
* Sets the player's rotation.
|