Files
Purpur/patches/server/0279-Add-death-screen-API.patch
Ben Kerllenevich fa3166a24d Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@8bc0574 Bump kyori's ansi to fix color bleed (#9346)
PaperMC/Paper@f7b386d Use ANSI serializer for console completion descriptions (#9351)
PaperMC/Paper@41e6f20 Updated Upstream (Bukkit/CraftBukkit) (#9342)
PaperMC/Paper@b134eb4 Fix incorrect annotation on BrushableBlock#getItem (#9345)
PaperMC/Paper@fa674f3 Don't enforce icanhasbukkit default if alias block exists (#9334)
PaperMC/Paper@81834ac Updated Upstream (Bukkit/CraftBukkit/Spigot)
PaperMC/Paper@f6139de Fix sniffer removeExploredLocation and javadoc (#9311)
PaperMC/Paper@17966dd Update the server logo (#9264)
PaperMC/Paper@02e3b5a chore(api): add missing javadoc urls (#9355)
PaperMC/Paper@3f237e8 Fix IntegerUtil#getDivisorNumbers
PaperMC/Paper@f555138 Make sure to post process chunks before they are sent to players
PaperMC/Paper@a226f44 Copy itemstack when sanitizing for datawatcher items
PaperMC/Paper@3885666 Remove stacktrace on exception from reading server.properties (#9296)
2023-06-17 09:33:51 -04: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 5c2a0f5e76e77b0d73b73ab893d253e86f0f8433..3d2c4ba68b1fdc10d7592164e1fab9b3a6458187 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3261,5 +3261,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.DEBUG_GAME_TEST_CLEAR, new FriendlyByteBuf(io.netty.buffer.Unpooled.buffer())));
}
+
+ @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
}