Files
Purpur/patches/api/0045-Add-death-screen-API.patch
granny c9aee076fc Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@996d529 Resend entity using the bundle packet (#9853)
PaperMC/Paper@8cf2503 Updated Upstream (Bukkit/CraftBukkit) (#9876)
PaperMC/Paper@2935067 Fix null item in sendEquipmentChange (#9869)
PaperMC/Paper@b3cac04 Fix crash when version_history.json is empty (#9871)
PaperMC/Paper@b1faa5d Fix PotionAPI ignores icon flag (#9864)
PaperMC/Paper@52849f6 Cleanup disable explosion knockback patch (#9858)
PaperMC/Paper@8b1ac39 Fix warden spawn reason from DEFAULT to NATURAL (#8744)
PaperMC/Paper@c6fac38 fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846)
PaperMC/Paper@5bdfb29 Add player idle duration API (#9833)
PaperMC/Paper@a81a384 Implement Velocity VarInt optimizations (#8418)
PaperMC/Paper@415d708 [ci skip] Fix author in last patch
PaperMC/Paper@3e4eaf2 [ci skip] Fix module derp
PaperMC/Paper@5bb30ce Fix entity camera not being reset when cancelling spectating start/stop events (#9883)
PaperMC/Paper@1865625 Fix NPE when no valid world is found on legacy Players (#9885)
2023-10-29 12:39:53 -07:00

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 ab74fa8ef7bb273b3b2abc519ba4957873826037..ccbde7687d67dec442bed0df72af1f36cc26d179 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3399,5 +3399,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
}