Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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;
}
 
PREVIOUS NEXT
Tagged: #Spigot #coding #send #message #player #commadn
ADD COMMENT
Topic
Name
7+7 =