Item Bar (Below Action Bar)

Discussion in 'Plugin Development' started by nathanthesnooper, Feb 17, 2018.

Thread Status:
Not open for further replies.
  1. Any APIs to display that? (Or some code)

    [​IMG]

    Top: Action Bar
    Bottom: Item Bar
     
  2. Offline

    Lorinthio

    Could be done a couple of ways. Rename the item in hand then restore the original item.
    Or send a packet (ProtocolLib).

    As well as some others that I'm sure more people will provide!
     
  3. @Lorinthio
    How could I do this with ProtocolLib?

    Something like this?
    Code:
    public static void displayItemBar (Player player, String message) {
        PacketContainer packet = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.WINDOW_ITEMS);
        packet.getStrings().write(0, message);
        try {
            ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
    Also, I don't want to do the rename item in hand, because as soon as I set it back it will show the old name again
     
    Last edited: Feb 17, 2018
  4. Offline

    MattTheBeast

    @nathanthesnooper
    I recommend you just use the action bar to display messages, the item bar can get messy very easily and isn’t really used much except for hubs
     
Thread Status:
Not open for further replies.

Share This Page