手册:Level.executeCommand

来自Minecraft基岩版开发Wiki

语法[编辑]

Level.executeCommand(par1String, par2boolean);

参数[编辑]

参数一
String类型 命令(不加“/”,执行者为服务器)
参数二
boolean类型 未知意义

效果[编辑]

执行命令

参考[编辑]

Level.executeCommand("time set day", 0);
//设置时间为白天
Level.executeCommand("me HelloWorld", 0);
//聊天栏输出“ * 服务器 HelloWorld”

Template:ModPE