13
0
geforkt von Mirrors/Paper

SPIGOT-7038: Setting title or subtitle to empty string causes the player to disconnect

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2022-06-08 17:34:21 +10:00
Ursprung 5806a895dc
Commit b6c55ade98

Datei anzeigen

@ -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);
}
}