mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
SPIGOT-7038: Setting title or subtitle to empty string causes the player to disconnect
By: md_5 <git@md-5.net>
This commit is contained in:
parent
5806a895dc
commit
b6c55ade98
1 changed files with 2 additions and 2 deletions
|
@ -1754,12 +1754,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
getHandle().connection.send(times);
|
||||
|
||||
if (title != null) {
|
||||
ClientboundSetTitleTextPacket packetTitle = new ClientboundSetTitleTextPacket(CraftChatMessage.fromStringOrNull(title));
|
||||
ClientboundSetTitleTextPacket packetTitle = new ClientboundSetTitleTextPacket(CraftChatMessage.fromString(title)[0]);
|
||||
getHandle().connection.send(packetTitle);
|
||||
}
|
||||
|
||||
if (subtitle != null) {
|
||||
ClientboundSetSubtitleTextPacket packetSubtitle = new ClientboundSetSubtitleTextPacket(CraftChatMessage.fromStringOrNull(subtitle));
|
||||
ClientboundSetSubtitleTextPacket packetSubtitle = new ClientboundSetSubtitleTextPacket(CraftChatMessage.fromString(title)[0]);
|
||||
getHandle().connection.send(packetSubtitle);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue