mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@eb0693f Fix EntityDeathEvent cancellation (#9323) PaperMC/Paper@f8cfdd4 Fix SmithingInventory helper slot methods for 1.20 (#9325) PaperMC/Paper@de19eb8 fix incorrectly updated move vector checking patch (#9328) PaperMC/Paper@87dfff4 Implement BossBarViewer on Player (#9332) PaperMC/Paper@2d09115 Use net.kyori.ansi for console logging (#9313) PaperMC/Paper@b48e2e3 Fix dev bundle generation PaperMC/Paper@c287e92 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301) PaperMC/Paper@2e363c7 1.20.1 (#9333)
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MelnCat <melncatuwu@gmail.com>
|
|
Date: Fri, 23 Sep 2022 18:35:28 -0700
|
|
Subject: [PATCH] Add death screen API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index e9fe4a91f8d0e64dad18435c89c5cc53e21c0d97..84bd594baa2d72033b08ca79309b004d3c6807a2 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -3205,5 +3205,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
* Clears all debug block highlights
|
|
*/
|
|
void clearBlockHighlights();
|
|
+
|
|
+ /**
|
|
+ * Sends a player the death screen with a specified death message.
|
|
+ *
|
|
+ * @param message The death message to show the player
|
|
+ */
|
|
+ void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message);
|
|
+
|
|
+ /**
|
|
+ * Sends a player the death screen with a specified death message,
|
|
+ * along with the entity that caused the death.
|
|
+ *
|
|
+ * @param message The death message to show the player
|
|
+ * @param killer The entity that killed the player
|
|
+ * @deprecated Use {@link #sendDeathScreen(net.kyori.adventure.text.Component)} instead, as 1.20 removed the killer ID from the packet.
|
|
+ */
|
|
+ @Deprecated(since = "1.20")
|
|
+ default void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message, @Nullable Entity killer) {
|
|
+ sendDeathScreen(message);
|
|
+ }
|
|
// Purpur end
|
|
}
|