Titles not always showing

Discussion in 'Plugin Development' started by nathanthesnooper, Nov 2, 2017.

Thread Status:
Not open for further replies.
  1. Sometimes, on my server, titles do not display at all for a user until they restart. However, servers like Hypixel can show it every time. What am I doing wrong?

    Code:
    public static void displayTitle (Player player, String title, String message, int life) {
        PacketPlayOutTitle title2 = new PacketPlayOutTitle(EnumTitleAction.TITLE, ChatSerializer.a("{\"text\":\"" + title + "\"}"), 0, life, 20);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(title2);
        PacketPlayOutTitle subtitle2 = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, ChatSerializer.a("{\"text\":\"" + message + "\"}"), 0, life, 20);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(subtitle2);
    }
     
  2. Offline

    Zombie_Striker

    @nathanthesnooper
    As of 1.10, bukkit has a Player#sendTitle() method. I recommend you use that instead of packets.
     
  3. @Zombie_Striker Can I update my bukkit jar to 1.10 while still having a spigot 1.8 server?
     
  4. Offline

    Zombie_Striker

    @nathanthesnooper
    The bukkit jar and the spigot jar are the same thing: spigot is a fork of bukkit.

    Either way, there is no reason to stay on 1.8. You can still have <Edit by Moderator: Redacted not allowed paid resource url> PVP on the newer updates,[/URL] and 1.8 had a ton of exploits and permission escalation hacks. Update your server.
     
    Last edited by a moderator: Feb 9, 2021
    ipodtouch0218 likes this.
  5. @Zombie_Striker My question is if I can have a bukkit-1.10.jar plugin on a server that somehow allows players with 1.8. (ViaBackwards doesn't work)
     
  6. Offline

    Zombie_Striker

    @nathanthesnooper
    No; there is no supported way to get different versions to join the same server.

    Even then, why support 1.8, when that is what causes a majority the exploits?
     
Thread Status:
Not open for further replies.

Share This Page