Check out example codes for "Spigot coding how to send a message to player after commadn". It will help you in understanding the concepts better.

Code Example 1

//After Command
public boolean onCommand(CommandSender sender, Command cmd, String[] args, String tag) {
	if(tag.equals("test")) {
    	Player player = (Player)sender; //getting the player reference
        player.sendMessage("Hello World!"); 
    	return true;
    }
    return false;
}

Learn ReactJs, React Native from akashmittal.com