mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
Send title timings before sending titles
This commit is contained in:
parent
b5a10a9d6d
commit
e1fb9cb640
@ -1434,6 +1434,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut) {
|
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) {
|
if (title != null) {
|
||||||
PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, CraftChatMessage.fromString(title)[0]);
|
PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, CraftChatMessage.fromString(title)[0]);
|
||||||
getHandle().playerConnection.sendPacket(packetTitle);
|
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]);
|
PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, CraftChatMessage.fromString(subtitle)[0]);
|
||||||
getHandle().playerConnection.sendPacket(packetSubtitle);
|
getHandle().playerConnection.sendPacket(packetSubtitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPlayOutTitle times = new PacketPlayOutTitle(fadeIn, stay, fadeOut);
|
|
||||||
getHandle().playerConnection.sendPacket(times);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user