Solved Actionbar usage 1.16

Discussion in 'Plugin Development' started by Minemakki, Jan 8, 2021.

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

    Minemakki

    Is it possible to use player actionbar with Bukkit 1.16? I have been trying different apis and got none of them to work. Any help is appreciated!

    Code:
    public static void SendActionBar(Player player, String message) {
            
            // Get player uuid
            UUID uuid = player.getUniqueId();
           
            // send actionbar to player
            IChatBaseComponent barmsg = ChatSerializer.a("{\"text\": \"" + message + "\"}");
            PacketPlayOutChat bar = new PacketPlayOutChat(barmsg, ChatMessageType.GAME_INFO, uuid);
            ((CraftPlayer) player).getHandle().playerConnection.sendPacket(bar);
        }
     
    Last edited: Jan 14, 2021
  2. Offline

    JanTuck

Thread Status:
Not open for further replies.

Share This Page