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

Paper Changes:
PaperMC/Paper@3aec863 Add BlockLockCheckEvent (#7840)
PaperMC/Paper@0262de0 Deprecate TargetBlock/EntityInfo and assocated methods (#7381)
PaperMC/Paper@28c7d40 Add Sneaking API for Entities (#8485)
PaperMC/Paper@262c08f Updated Upstream (CraftBukkit) (#8680)
2022-12-16 10:40:50 -06: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 faa2954f68cf5c675e732bd1c6b456321ccb2ec2..18b8b0ee95216c7168d2502c901319f450e6e276 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3043,5 +3043,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
}