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

Code Example 1

// String title, String subtitle, int fadeIn, int stay, int fadeOut.
player.sendTitle("Welcome, " + ChatColor.AQUA + player.getDisplayName(), 10, 70, 20);

Learn ReactJs, React Native from akashmittal.com