Hi there! I have a method to send a player a title for a certain amount of time, but it's changing nothing. Here is my method, which I am calling with numbers like 400, but they are doing nothing but sending for the default time. Code (Text): public static void sendTab(Player p, String title, String subtitle, Integer fadein, Integer length, Integer fadeout){ CraftPlayer craftplayer = (CraftPlayer) p; PlayerConnection connection = craftplayer.getHandle().playerConnection; PacketPlayOutTitle main = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a("{\"text\":\"" + title + "\"}"), 50, 50, 30); PacketPlayOutTitle sub = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a("{\"text\":\"" + subtitle + "\"}"), 50, 50, 30); connection.sendPacket(main); connection.sendPacket(sub); } Thanks for any help!
Why don't you put in the values then? You're currently just hard coding the values as "50","50", and "30".
So I'm retarded and don't know what to do after: Code (Text): PacketPlayOutTitle time = new PacketPlayOutTitle(EnumTitleAction.TIMES, ChatSerializer.a("{\"text\":\"" + subtitle + "\"}")); :/ I know there obviously more besides just sending that packet too.
Hey! I'm usually the one asking for help but for this I can help You need to add ints in this order: FadeIn, Stay, FadeOut (Note this is in TICKS) And than you need to make the actual one with the same chatserializer. One with EnumTitleAction.TIMES and the 3 ints And one with EnumTitleAction.TITLE/SUBTITLE and without the 3 ints. And send both, timings first. If this is unoptimized or something, and someone recommends better alternative go with it. I'm not really experienced and I got this out of titleAPI. (After inspecting it's sourcecode on github) Next time you could look into that