mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix compilation issues (#1530)
This commit is contained in:
36
patches/api/0038-Add-death-screen-API.patch
Normal file
36
patches/api/0038-Add-death-screen-API.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
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 cdc0f844c1c2f7c8f0faee9112750354762ec5de..eb79e62e753524d6782842c662b0a50ab5ac0811 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3957,5 +3957,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
|
||||
}
|
||||
Reference in New Issue
Block a user