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

Paper Changes:
PaperMC/Paper@3c41f8f Cache map ids on item frames (#9584)
PaperMC/Paper@3b4839e Fix players are invisible after using setPlayerProfile (#9143)
PaperMC/Paper@20a71c5 Add restrict-player-reloot-time config (#7652)
PaperMC/Paper@29aaf7b Fix custom statistic criteria creation (#9595)
PaperMC/Paper@2df309b Bandaid fix for Effect (#9548)
PaperMC/Paper@1dfdbef SculkCatalyst bloom API (#9466)
PaperMC/Paper@02338e5 Fix DEFAULT getEntitySpawnReason for /summon (#9480)
PaperMC/Paper@23c44c2 [ci skip] Update README
2023-08-12 23:38:58 -07: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 71532b6ffed71a4e4f77ba1bb6d90abb0ff583b7..8b808264b8f3cc2ceb794fdd8aef7792bd18b269 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3337,5 +3337,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
}