13
0
geforkt von Mirrors/Paper

Send title timings before sending titles

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2017-12-30 13:39:54 +11:00
Ursprung a024f4c8d2
Commit 7fc559ec56

Datei anzeigen

@ -1434,6 +1434,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut) {
PacketPlayOutTitle times = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
getHandle().playerConnection.sendPacket(times);
if (title != null) {
PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, CraftChatMessage.fromString(title)[0]);
getHandle().playerConnection.sendPacket(packetTitle);
@ -1443,9 +1446,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, CraftChatMessage.fromString(subtitle)[0]);
getHandle().playerConnection.sendPacket(packetSubtitle);
}
PacketPlayOutTitle times = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
getHandle().playerConnection.sendPacket(times);
}
@Override