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

Code Example 1

@EventHandler
public void onJoin(PlayerJoinEvent e) {
	e.setJoinMessage("Welcome, " + e.getPlayer().getDisplayName());
}

Learn ReactJs, React Native from akashmittal.com