这个yaml文件有什么问题?

时间:2014-05-12 04:04:04

标签: yaml bukkit

我有一个bukkit插件的plugin.yml文件:

name: SlayCraft
version: 1.0.0
main: src.john01dav.slaycraft.SlayCraft

commands:
  scsetspawn:
    permission: slaycraft.setspawn
    description: Sets the SlayCraft spawn point to where you are standing
    usage: /scsetsapwn <arena/lobby>
  scjoin:
    permission: slaycraft.join
    description: Joins the SlayCraft game
    usage: /scjoin
  scfirework:
    permission: slaycraft.firework
    description: Launches a firework at the player's location
    usage: /scfirework
  scexplosion:
    permission: slaycraft.explosion:
    description: Launches an explosion at the player's location
    usage: /scexplosion

permissions:
  slaycraft.setspawn:
    default: op
  slaycraft.join:
    default: true
  slaycraft.firework:
    default: op
  slaycraft.explosion:
    default: op

这个yaml对我来说非常好,但是there are errors。有任何想法吗?我搜索过有类似错误的人,但似乎没有一个可以解释。

1 个答案:

答案 0 :(得分:3)

错误非常具体:

ERROR:

mapping values are not allowed here
  in "<unicode string>", line 19, column 36:
        permission: slaycraft.explosion:
                                       ^

这一行你有一个额外的冒号:

    permission: slaycraft.firework
    description: Launches a firework at the player's location
    usage: /scfirework
  scexplosion:
    permission: slaycraft.explosion: #<-- This colon is not needed.
    description: Launches an explosion at the player's location
    usage: /scexplosion

删除它。