📜  Spigot 编码如何在命令后向播放器发送消息 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:19.484000             🧑  作者: Mango

代码示例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;
}