mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-17 13:00:04 +08:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7a1863e Limit setBurnTime to valid short values (#9623) PaperMC/Paper@b8a0049 Fix exact choice recipe book clicks (#7822) PaperMC/Paper@b45ecc9 [ci skip] clear out test plugin PaperMC/Paper@0c8882f Add OfflinePlayer#isConnected (#9642)
23 lines
1.3 KiB
Diff
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 beae58414b27d2a33bb6507ae8ab2104fde2cc0e..668d825a2469706e4de11629a0b41877de700ca6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -3377,5 +3377,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
|
|
}
|