插件手册:mythicmobs:技能:机制列表:command

这是本文档旧的修订版!


command

为每个提供的目标执行一个命令。 允许使用颜色代码和变量。有关颜色代码列表,请查看此处。变量可以在这里找到。 如果指定的命令包含双引号 “ 或大括号 {} 并且必须用它们各自的消息变量替换,则指定的命令将无法正常运行。发生这种情况因为双引号和大括号是为 MythicMobs 本身保留的,试图阅读您提供的语法。

属性缩写描述默认值
commandcThe command to execute
asCasteracIf true the command will execute from the caster instead of the console.false
asOpopWhether to execute the command with all permissionsfalse
asTargetatExecutes the command as the skill targetfalse
requireTargetrtOnly executes if the skill has a targetfalse

正确书写的命令技能

  1. Skills:
  2. - command{c="give <target.name> gold_ingot 20"} @trigger ~onInteract
  3. - command{c="minecraft:tp <target.name> <mob.uuid>"} @self ~onDamaged
  4. - command{c="minecraft:summon Zombie ~ ~ ~ <&lc>NoAI:true,CustomName:<&dq>Summoned Zombie<&dq><&rc>"}
  5. - command{c="minecraft:summon Zombie ~ ~ ~ {NoAI:true,CustomName:<&dq>Summoned Zombie<&dq>}"}

无效的命令技能 下面的示例将不起作用,因为某些符号没有被消息变量替换。

  1. Skills:
  2. - command{c="minecraft:summon Zombie ~ ~ ~ {NoAI:true,CustomName:"Summoned Zombie"}"}
  • 插件手册/mythicmobs/技能/机制列表/command.1630977819.txt.gz
  • 最后更改: 2021/09/07 09:23
  • duangfafa