InvalidConfigurationException: while parsing a block mapping

Discussion in 'Plugin Development' started by Cherwin1, Jun 8, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Cherwin1

    Hello,

    Im busy with making a final build for my plugin
    But everytime i reload my test server it shows up an error.

    Code:
    [22:01:22 ERROR]: Cannot load plugins\RewardVoting\config.yml
    org.bukkit.configuration.InvalidConfigurationException: while parsing a block ma
    pping
    in "<string>", line 12, column 1:
        vault: true
        ^
    expected <block end>, but found Anchor
    in "<string>", line 94, column 18:
        offlinemessage: "&b%s voted for us, when he was o ...
                        ^
     
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:57) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnk
    s]
            at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguratio
    n.java:226) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguratio
    n.java:169) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(Yam
    lConfiguration.java:180) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095
    jnks]
            at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:183) [
    craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:157) [cra
    ftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at votepackage.main.onEnable(main.java:187) [RewardVoting.jar:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [cr
    aftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:324) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:404) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.jav
    a:446) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.
    java:380) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.reload(CraftServer.java:79
    9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.Bukkit.reload(Bukkit.java:288) [craftbukkit.jar:git-Bukkit
    -1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
    23) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
    0) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe
    r.java:701) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(Craf
    tServer.java:688) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:
    296) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
    61) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
    58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
    :469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
    Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapp
    ing; expected <block end>, but found Anchor
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:575) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~
    [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
    ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~
    [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    3) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
    ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:121) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[craftbukkit.j
    ar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:399) ~[craftbukkit.jar:git-Buk
    kit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:55) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnk
    s]
            ... 22 more
    [22:01:22 ERROR]: [RewardVoting] Cannot load configuration from jar
    org.bukkit.configuration.InvalidConfigurationException: while parsing a block ma
    pping
    in "<string>", line 12, column 1:
        vault: true
        ^
    expected <block end>, but found Anchor
    in "<string>", line 94, column 18:
        offlinemessage: "&b%s voted for us, when he was o ...
                        ^
     
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:57) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnk
    s]
            at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:209) [
    craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:157) [cra
    ftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at votepackage.main.onEnable(main.java:187) [RewardVoting.jar:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [cr
    aftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:324) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:404) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.jav
    a:446) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.
    java:380) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.reload(CraftServer.java:79
    9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.Bukkit.reload(Bukkit.java:288) [craftbukkit.jar:git-Bukkit
    -1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
    23) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
    0) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe
    r.java:701) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(Craf
    tServer.java:688) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:
    296) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
    61) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
    58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
    :469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
    Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapp
    ing; expected <block end>, but found Anchor
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:575) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~
    [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
    ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~
    [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    3) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
    ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:121) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[craftbukkit.j
    ar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:399) ~[craftbukkit.jar:git-Buk
    kit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:55) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnk
    s]
            ... 19 more
    I dont know how to fix this?!

    This is my config:

    Code:
    ################################
    ####RewardVoting Config file####
    ################################
     
    #WARNING: You CAN'T just put a new sentence in here and think it will work...
    #If you found any bugs or have ideas, email me: cherwinsupport@hotmail.com
     
    ########################
    #Toggle these on or off#
    ########################
     
    vault: true
     
    update-checker: true
     
    #broadcast: true
     
    #lucky-votes: false
     
    ###########
    ##Rewards##
    ###########
     
    #A specific item!
    itemid1: 0
    itemamount1: 0
    #A specific item!
    itemid2: 0
    itemamount2: 0
    #A specific item!
    itemid3: 0
    itemamount3: 0
    #A specific item!
    itemid4: 0
    itemamount4: 0
    #A specific item!
    itemid5: 0
    itemamount5: 0
    #A specific item!
    itemid6: 0
    itemamount6: 0
     
    #A specific potion!
    #Replace the 0 at potion1/potion2 with 373 to enable the specific potion!
    potion1: 0
    potionamount1: 0
    potionmeta1: 0
     
    #A specific potion!
    #Replace the 0 at potion1/potion2 with 373 to enable the specific potion!
    potion2: 0
    potionamount2: 0
    potionmeta2: 0
     
    #Amount of exp levels a player get for voting!
    explevel: 0
     
    #Amount of money a player gets for voting!
    #Economy plugins that are supported are listed at the Vault site!
    money: 0
     
    #A specific command! (Like: /msg %s thanks for voting!)
    command: ""
     
    ##############
    ##Vote sites##
    ##############
     
    #Add colors to the vote sites!
     
    votesites:
    - "&ahttps://www.example.com/"
     
    ############
    ##Messages##
    ############
     
    #Add &[colorcode] to the begin of the message to change the code! Only works on the messages below...
     
    #Name displayed when you type '/vote'!
    votename: "RewardVoting"
     
    #Broadcast message that is displayed when the server hits 100, 200, 300, 400 or more votes! ('%s' = amount of votes)
    milestonemessage: "The server just passed %s votes!"
     
    #Message displayed to someone who logs into the server!
    joinmessage: "&0[&6&lRewardVoting&r&0]&r Don't forget to vote for the server! /vote"
     
    #Message that the server broadcasts when someone votes. It is {playername} [Broadcast Message]
    #The first '%s' = The name of the voter | The second '%s' = The service name (website the player voted on)
    broadcastmessage: "&b%s voted for us on %s and got his &4rewards!
     
    #The message displayed when someone voted when he is offline
    offlinemessage: "&b%s voted for us, when he was offline, but queue saved the day!"
     
    #Set the message you get when you reloaded the plugin using /vreload
    reloadmessage: "&aSuccesfully reloaded the plugin!"
     
    #Message shown when a player does /rewardvoting freediamonds
    freediamonds: "&4Did you really think you get free diamonds?!"
     
     
    ###############################                                       
    ####RewardVoting#changelog!####                             
    ###############################
    #
    # 6.0 (BETA UPDATE)     
    #
    # + You can give color to the vote sites!
    # + Improved /vote (No empty spaces!)
    # + Vote queue!
    # + Milestone!
    # + Change the milestone with '/rv setmilestone [amount]' (OP ONLY)
    # + Added player votes!
    # + Added some /rv arguments (Donators, milestone, setmilestone, totalvotes, votes)
    # * Fixed config glitch (When someone votes and config is open)
    # * Milestones, totalvotes, playervotes are now in 'voters.yml
    # ! Lucky votes
    #
    # Notes:
    # + = Added, - = Removed, * = Fixed/Changed, ! = Planned
    # Vote queue isn't here yet! but it will be soon!                       
    #
    ###############################                                               
    #######End of changelog########
    ###############################
    Please help me!
    I want to release my plugin as fast as possible.

    ----------
    Cherwin
     
  2. Offline

    DJSkepter

    Cherwin1 You missed a quote marks somewhere:
    Code:
    ################################
    ####RewardVoting Config file####
    ################################
     
    #WARNING: You CAN'T just put a new sentence in here and think it will work...
    #If you found any bugs or have ideas, email me: cherwinsupport@hotmail.com
     
    ########################
    #Toggle these on or off#
    ########################
     
    vault: true
     
    update-checker: true
     
    #broadcast: true
     
    #lucky-votes: false
     
    ###########
    ##Rewards##
    ###########
     
    #A specific item!
    itemid1: 0
    itemamount1: 0
    #A specific item!
    itemid2: 0
    itemamount2: 0
    #A specific item!
    itemid3: 0
    itemamount3: 0
    #A specific item!
    itemid4: 0
    itemamount4: 0
    #A specific item!
    itemid5: 0
    itemamount5: 0
    #A specific item!
    itemid6: 0
    itemamount6: 0
     
    #A specific potion!
    #Replace the 0 at potion1/potion2 with 373 to enable the specific potion!
    potion1: 0
    potionamount1: 0
    potionmeta1: 0
     
    #A specific potion!
    #Replace the 0 at potion1/potion2 with 373 to enable the specific potion!
    potion2: 0
    potionamount2: 0
    potionmeta2: 0
     
    #Amount of exp levels a player get for voting!
    explevel: 0
     
    #Amount of money a player gets for voting!
    #Economy plugins that are supported are listed at the Vault site!
    money: 0
     
    #A specific command! (Like: /msg %s thanks for voting!)
    command: ""
     
    ##############
    ##Vote sites##
    ##############
     
    #Add colors to the vote sites!
     
    votesites:
    - "&ahttps://www.example.com/"
     
    ############
    ##Messages##
    ############
     
    #Add &[colorcode] to the begin of the message to change the code! Only works on the messages below...
     
    #Name displayed when you type '/vote'!
    votename: "RewardVoting"
     
    #Broadcast message that is displayed when the server hits 100, 200, 300, 400 or more votes! ('%s' = amount of votes)
    milestonemessage: "The server just passed %s votes!"
     
    #Message displayed to someone who logs into the server!
    joinmessage: "&0[&6&lRewardVoting&r&0]&r Don't forget to vote for the server! /vote"
     
    #Message that the server broadcasts when someone votes. It is {playername} [Broadcast Message]
    #The first '%s' = The name of the voter | The second '%s' = The service name (website the player voted on)
    broadcastmessage: "&b%s voted for us on %s and got his &4rewards!"
     
    #The message displayed when someone voted when he is offline
    offlinemessage: "&b%s voted for us, when he was offline, but queue saved the day!"
     
    #Set the message you get when you reloaded the plugin using /vreload
    reloadmessage: "&aSuccesfully reloaded the plugin!"
     
    #Message shown when a player does /rewardvoting freediamonds
    freediamonds: "&4Did you really think you get free diamonds?!"
     
     
    ###############################                                     
    ####RewardVoting#changelog!####                           
    ###############################
    #
    # 6.0 (BETA UPDATE)   
    #
    # + You can give color to the vote sites!
    # + Improved /vote (No empty spaces!)
    # + Vote queue!
    # + Milestone!
    # + Change the milestone with '/rv setmilestone [amount]' (OP ONLY)
    # + Added player votes!
    # + Added some /rv arguments (Donators, milestone, setmilestone, totalvotes, votes)
    # * Fixed config glitch (When someone votes and config is open)
    # * Milestones, totalvotes, playervotes are now in 'voters.yml
    # ! Lucky votes
    #
    # Notes:
    # + = Added, - = Removed, * = Fixed/Changed, ! = Planned
    # Vote queue isn't here yet! but it will be soon!                     
    #
    ###############################                                             
    #######End of changelog########
    ###############################
     
  3. Offline

    Cherwin1


    I dont see where i missed a quote?!
     
  4. Offline

    DJSkepter

    Cherwin1 It's the one with the broadcastmessage - ..... &4rewards!
     
  5. Offline

    Cherwin1

    Thank you so much :)
    me and a friend of mine could not find the error ;)
     
Thread Status:
Not open for further replies.

Share This Page