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

Paper Changes:
PaperMC/Paper@f9edc4b Update paperweight to 1.5.11
PaperMC/Paper@2f92d4e Updated Upstream (Bukkit/CraftBukkit)
PaperMC/Paper@8d8eb3b optimise explosion damage further
PaperMC/Paper@7606e6d fixup tests and add missing API detected by those tests
PaperMC/Paper@f17622c more cleanup and resource pack api fixes
PaperMC/Paper@9051fc3 remove redundant patch
2023-12-08 16:24:28 -08:00

23 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MelnCat <melncatuwu@gmail.com>
Date: Fri, 23 Sep 2022 18:41:05 -0700
Subject: [PATCH] Add death screen API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1475964d04ebdcc08b4f67a516216162d8f8db2e..c0780208bbdcb7a4c67ce107312e57c3de681a5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3383,5 +3383,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;
this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload()));
}
+
+ @Override
+ public void sendDeathScreen(net.kyori.adventure.text.Component message) {
+ if (this.getHandle().connection == null) return;
+ this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message)));
+ }
// Purpur end
}