Files
Purpur/patches/api/0052-Add-death-screen-API.patch
BillyGalbreath 103965b5b4 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@8681503 Call EntityChangeBlockEvent for frogs egg (#8136)
PaperMC/Paper@ec0c550 Call BlockPhysicsEvent more often (#8264)
PaperMC/Paper@f528f53 Correct javadocs on PlayerArmorStandManipulateEvent (#7719)
PaperMC/Paper@3996e6e Updated Upstream (Bukkit/CraftBukkit/Spigot)
2022-09-23 23:11:56 -05: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 d0d617284248065e728e4940d240be5bff1103e4..80f0d631a9780ec853b2ab44d5bcbec45f7d4051 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2972,5 +2972,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
}