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

Paper Changes:
PaperMC/Paper@afa16e6 Modify offline mode warning to include Velocity line (#8812)
PaperMC/Paper@de38a45 Add projectile hit simulation API (#8816)
PaperMC/Paper@7e7e6b4 More Win Screen API (#8805)
PaperMC/Paper@bd77b78 Fix desync of honeycomb when the event is canceled (#8713)
PaperMC/Paper@bb05fcf Add missing isFuel Material entries (#8843)
PaperMC/Paper@8d1acf6 Call PlayerReadyArrowEvent for when items in the offhand are used (#8842)
PaperMC/Paper@f2f9e8c Remove patch that was made obsolete by vanilla (#8847)
2023-02-13 15:48:05 -08:00

33 lines
1.2 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 9464ec6b436b79f015f50279aed2ed38e32d5909..d5ad02c1fa2b840289d316400952aaebb8c5dad1 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3118,5 +3118,21 @@ 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 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
+ */
+ void sendDeathScreen(@NotNull Component message, @Nullable Entity killer);
// Purpur end
}