Change action bar time shown

Discussion in 'Plugin Development' started by NoobDoesMC, Apr 7, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    NoobDoesMC

    Minecraft's title command lets you change the fade out time and time shown

    Code:
    /title <player> times <fadeIn> <stay> <fadeOut>
    How can I set the time shown of my action bar message

    Code:
    CraftPlayer player = (CraftPlayer) bukkitPlayer;
    IChatBaseComponent chatBaseComponent = ChatSerializer.a("{\"text\": \"" + message + "\"}");
    PacketPlayOutChat packetPlayOutChat = new PacketPlayOutChat(chatBaseComponent, (byte) 2);
    player.getHandle().playerConnection.sendPacket(packetPlayOutChat);
    
    The above code shows an action bar message for 2 seconds, then it fades out for 1 second.

    can i change these settings? I want to shorten the time that it's shown for, and change the fade out time.
     
  2. This is just a simple thought. You might can send the packets that changes title times and then send the packet chat.
     
Thread Status:
Not open for further replies.

Share This Page