From 9f9c2c9d060cea2f52df14a72b62291a3e9f9218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Sun, 10 Feb 2019 15:05:03 +0800 Subject: [PATCH] + fix title --- pom.xml | 2 +- .../java/me/skymc/taboolib/common/nms/NMSHandlerImpl.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e945d57..413bf93 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.skymc TabooLib - 4.71 + 4.72 UTF-8 diff --git a/src/main/java/me/skymc/taboolib/common/nms/NMSHandlerImpl.java b/src/main/java/me/skymc/taboolib/common/nms/NMSHandlerImpl.java index 15de1a0..6fa119e 100644 --- a/src/main/java/me/skymc/taboolib/common/nms/NMSHandlerImpl.java +++ b/src/main/java/me/skymc/taboolib/common/nms/NMSHandlerImpl.java @@ -17,8 +17,10 @@ public class NMSHandlerImpl extends NMSHandler { @Override public void sendTitle(Player player, String title, int titleFadein, int titleStay, int titleFadeout, String subtitle, int subtitleFadein, int subtitleStay, int subtitleFadeout) { - TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, new ChatComponentText(String.valueOf(title)))); - TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, new ChatComponentText(String.valueOf(subtitle)))); + TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TIMES, new ChatComponentText(String.valueOf(title)), titleFadein, titleStay, titleFadeout)); + TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, new ChatComponentText(String.valueOf(title)), titleFadein, titleStay, titleFadeout)); + TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TIMES, new ChatComponentText(String.valueOf(subtitle)), subtitleFadein, subtitleStay, subtitleFadeout)); + TPacketHandler.sendPacket(player, new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, new ChatComponentText(String.valueOf(subtitle)), subtitleFadein, subtitleStay, subtitleFadeout)); } @Override