mc-hipower
本帖最后由 mc-hipower 于 2020-5-1 16:59 编辑

想把一个玩家传送到指定x y z要用什么命令


mc-hipower
请大佬指点

如下 location包含 world x y z
  1. player.teleport(location);
复制代码

mc-hipower
星 发表于 2020-5-1 16:59
如下 location包含 world x y z

括号里用加世界名称吗?

南柯郡守
mc-hipower 发表于 2020-5-1 17:03
括号里用加世界名称吗?

括号里是一个Location 坐标类 不是字符串也不是World

mc-hipower
南柯郡守 发表于 2020-5-1 17:17
括号里是一个Location 坐标类 不是字符串也不是World

谢谢大佬了,如果想传送到别的世界该如何写

南柯郡守
mc-hipower 发表于 2020-5-1 17:20
谢谢大佬了,如果想传送到别的世界该如何写

把Location里面的World改变一下
Location location ;
World world;
******
location.setWorld(world);

mc-hipower
南柯郡守 发表于 2020-5-1 17:23
把Location里面的World改变一下
Location location ;
World world;

非常感谢Thanks?(?ω?)?

第一页 上一页 下一页 最后一页