change player join message spigot code example
Example 1: spigot custom join message
@EventHandler
public void onJoin(PlayerJoinEvent e) {
e.setJoinMessage("Welcome, " + e.getPlayer().getDisplayName());
}
Example 2: Spigot coding how to send a message to player after commadn
//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;
}