mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-11 14:21:40 +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
@ -1754,12 +1754,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
getHandle().connection.send(times);
|
getHandle().connection.send(times);
|
||||||
|
|
||||||
if (title != null) {
|
if (title != null) {
|
||||||
ClientboundSetTitleTextPacket packetTitle = new ClientboundSetTitleTextPacket(CraftChatMessage.fromStringOrNull(title));
|
ClientboundSetTitleTextPacket packetTitle = new ClientboundSetTitleTextPacket(CraftChatMessage.fromString(title)[0]);
|
||||||
getHandle().connection.send(packetTitle);
|
getHandle().connection.send(packetTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtitle != null) {
|
if (subtitle != null) {
|
||||||
ClientboundSetSubtitleTextPacket packetSubtitle = new ClientboundSetSubtitleTextPacket(CraftChatMessage.fromStringOrNull(subtitle));
|
ClientboundSetSubtitleTextPacket packetSubtitle = new ClientboundSetSubtitleTextPacket(CraftChatMessage.fromString(title)[0]);
|
||||||
getHandle().connection.send(packetSubtitle);
|
getHandle().connection.send(packetSubtitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user