Configs Again

Discussion in 'Spigot Plugin Development' started by Checkium, May 30, 2015.

  1. Im getting this error on console
    Code (Text):

    [15:29:34 INFO]: [CraftingThings] Enabling CraftingThings v1.0
    [15:29:34 WARN]: [CraftingThings] Default system encoding may have misread confi
    g.yml from plugin jar
    [15:29:34 ERROR]: [CraftingThings] Cannot load configuration from jar
    org.bukkit.configuration.InvalidConfigurationException: expected '<document star
    t>', but found BlockMappingStart
    in 'string', line 13, column 1:
        CraftDisk11: true
        ^

            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:57) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:209) [
    spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:157) [spi
    got.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at me.check_plys.craftingthings.Main.horsearmouriron(Main.java:96) [Craf
    ting.jar:?]
            at me.check_plys.craftingthings.Main.onEnable(Main.java:31) [Crafting.ja
    r:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [sp
    igot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:332) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:412) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.jav
    a:476) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.
    java:394) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:86
    6) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.Bukkit.reload(Bukkit.java:301) [spigot.jar:git-Spigot-1.7.
    9-R0.2-208-ge0f2e95]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
    23) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
    1) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServe
    r.java:767) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(Craf
    tServer.java:753) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:
    326) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2
    90) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5
    84) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :490) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    Caused by: org.yaml.snakeyaml.parser.ParserException: null; expected '<document
    start>', but found BlockMappingStart;  in 'string', line 13, column 1:
        CraftDisk11: true
        ^
            at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(Parse
    rImpl.java:225) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~
    [spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
    ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108)
    ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:120) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481) ~[spigot.jar:gi
    t-Spigot-1.7.9-R0.2-208-ge0f2e95]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:400) ~[spigot.jar:git-Spigot-1
    .7.9-R0.2-208-ge0f2e95]
            at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlCo
    nfiguration.java:55) ~[spigot.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
            ... 20 more
     

    Code (Text):

    # Plugin Developed by  __________   __        __
    #                     |__________|  \ \      / /
    #                         | |        \ \    / /
    #                         | |         \ \  / /
    #                         | |          \ \/ /
    #                         | |          / /\ \
    #                         | |         / /  \ \
    #                         |_|        /_/    \_\ Craft Network
    #
    #
    # Enable Crafts:

    CraftDisk11: true
    CraftSaddle: true
    CraftIronHorseArmour: true

    # Messages:

    #      This will show in all messages
    Tag: '&f[&eCraftingThings&f]'

    #      This will show if a player try to use a command without permission
    NoPermissionMessage: '&4No Permission'

    #      This will show if a player use "/ct help" command
    #      Download the craft template on plugin page or use default link provided (in the same page)
    HelpMessage: '&1Se all commands here http://domain.com/crafts'
     

    Code: http://pastebin.com/9qCxGZGu
     
    #1 Checkium, May 30, 2015
    Last edited: May 30, 2015
  2. Remove the comments from the beginning. For some reason the Bukkit YAML parser doesnt like comments at the header of the file unless there is a key: value directly below it (no blank lines between them). Really strange stuff, but it is what it is.
     
  3. You got error on your config file.