How to use net minecraft server to have action bar messages code example
Example: spigot action bar
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("This message will be in the Action Bar"));
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("This message will be in the Action Bar"));