加载yaml文件时出错:此处不允许映射值

时间:2013-07-13 23:52:28

标签: java loading yaml configuration-files bukkit

我有奇怪的问题......

我有那个班:

http://pastebin.com/0rn9jCZd

那个configFile:

# ProfessionalWarns plugin config :) Plugin by BukkitSmerf.

General:
  V: 0.01
  Language: EN
  DB: SQLite
  MySQl:
    user: username
    db: database
    pass: password
    host: host
  WriteComments: true
  AutoUpdateConfigs: true
  CheckForUpdates: true
  AutoUpdate: false
Warns:
  MaxWarns: 100
  DefaultReason: '&4No reason'
  SpecialWarnMessage:
    Enabled: true
    WarnAliases:
    - "25:ray:Cheating using x-ray"
    - "90:nodus:Cheating using nodus#Lightning %p"
  CommandsAfterWarn:
  - "lighnting %p"
  Broadcast: true
  AfterMaxWarns:
    ResetWarnsTo: 25
    ResetWarnsWarnReason: '&9Reseting warns...'
    Ban: true
    BanOptions:
      Reason: '&4Too many warnings!'
      Time: 1w
      BanIp: true
    RunCommands: []
    Broadcast: true
Bans:
  DefaultReason: '&4No reason'
  DefaultTime: '5y'
  BanAliases: []
  RunCommands: []
Mutes:
  PlayerMute:
    CanUseCommand: true
    CommandList: [msg, tell, call, w, mail]
  GlobalMute:
    CanUseCommand: true
    CommandList: []
Jails:
  UseWordGuard: false
  UseBorders: true
  DefaultJail:
    Jail:
      Flags:
        Player:
          BlockAllInteract: false
          CanPlaceBlocks: false
          CanBreakBlocks: false
          CanUseBlocks: true
          CanUseItems: true
          CanDropItems: false
          CanPickUpItems: false
          CanGetDamageFromPlayer: true
          CanGetDamageFromMobs: false
          CanGetDamageFromPotions: false
          CanGetDamageFromExplosions: false
          CanGetDamageFromFall: false
          CanGetDamageFromFire: false
          CanGetDamageFromLava: false
          CanGetDamageFromVoid: false
          CanGetDamageFromOthers: false
          CanDamageOthers: false
          CanDamageMobs: false
          CanChat: true
          CanTeleport: false
          CanUseVehicles: false
          CanPlaceVehicles: false
          CanDestroyVehicles: false
          CanPlacePaintingsAndItemFrames: false
          CanDestroyPaintingsAndItemFrames: false
          CanInteractWithItemFrames: false
          CanOtherInteracts: true
          CommandList: white
          List:
          - login
          - l
          - changepassword
          - tell
          - msg
        Region:
          SpawnMobs: true
          SpawnMonsters: true
          TntExplosion: false
          OtherExplosion: false
          Enderman: false
          Silverfish: false
Chat:
  CapsLock:
    Enabled: true
    MinMessageLength: 4
    MaxChars: 50
    Commands: []
    CheckCommands: [me, bc, broadcast]
  Spam:
    Enabled: true
    Time: 1000
    SpamFilter:
      BlockIfThisSameMessage: true
      BlockRange: 3
      MultiPlayerCheck: false
      MultiBlockRange: 5
      ExtraFilter:
        Enabled: true
        Level: 0
        Percentage: 80
        MinimalLength: 10
    Commands: []
    GlobalMinimalLength: 2
    CheckCommands: [me, bc, broadcast]
  Ip:
    Enabled: True
    Commands: []
    CheckCommands: [me, bc, broadcast]
  Word:
    Enabled: True
    ReplaceSpaces: True
    Removed: [".", ","]
    Replaced: ["ó:o:u", "ą:a", "ę:e"]
    CheckCommands: [me, bc, broadcast]
    FastCheck:
    - "Give me op"
    - "I want op"
    - "IdiotCraft.com:4325"
    NormalCheck:
    - "fuck"
    Exceptions:
    - "Add Exceptions Here"
    Commands: []
IpTrack:
  Enabled: true
  Memory: 5

那个错误......: http://pastebin.com/E1HPssUX

我不知道如何解决这个问题......

如果我将配置更改为例如:

rgoerihgyuehguidih:
  gfyuertergherg: 2

然后我也和#34;同样的错误:"在rgoerihgyuehguidih:

所以......任何想法如何解决这个问题?我花了2天......但仍然没有; /

1 个答案:

答案 0 :(得分:0)

通过YAML验证程序运行您的配置,例如http://yaml-online-parser.appspot.com/,然后逐个选择错误,直到它通过。