There is ChatMessageType.ACTION_BAR class, but sendTitle() function only accepts 2 strings. Looks like there's no built-in method. I only found old discussions about this, help pls.
Yes, I tried to use API, but it was for an older version. I also tried this: player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("Hello, world!")); It didn't work too.
Here is how I achieve this in my plugins: Code: String message = "Wowzers. Actionbar message!"; player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message)); More info can be found here: The Chat Component API | SpigotMC - High Performance Minecraft