mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Fix NPE when using broadcast as players are joining
This commit is contained in:
parent
0e2c1c7288
commit
5a5d27f6a1
1 changed files with 1 additions and 0 deletions
|
@ -2241,6 +2241,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) {
|
||||
+ if (getHandle().connection == null) return;
|
||||
+ final ClientboundChatPacket packet = new ClientboundChatPacket(null, type == net.kyori.adventure.audience.MessageType.CHAT ? net.minecraft.network.chat.ChatType.CHAT : net.minecraft.network.chat.ChatType.SYSTEM, identity.uuid());
|
||||
+ packet.adventure$message = message;
|
||||
+ this.getHandle().connection.send(packet);
|
||||
|
|
Loading…
Reference in a new issue