Check out example codes for "spigot action bar". It will help you in understanding the concepts better.

Code Example 1

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("This message will be in the Action Bar"));

Learn ReactJs, React Native from akashmittal.com