Solved Config error

Discussion in 'Plugin Help/Development/Requests' started by bronzzze, Mar 26, 2015.

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

    bronzzze

    I have no idea what is wrong was all working fine but when I added:
    Code:
    p.sendMessage(ChatColor.translateAlternateColorCodes('&', main.getConfig()
                                .getString("Message on disabled world")));
    and:
    Code:
                        p.sendMessage(main.prefix
                                    + ChatColor
                                            .translateAlternateColorCodes(
                                                    '&',
                                                    main.getConfig()
                                                            .getString(
                                                                    "Message when you open Main Menu")));
    I got this error:

    Code:
    [18:14:31] [Server thread/ERROR]: [Wardrobe] Cannot load configuration from jar
    org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
    in 'string', line 1, column 1:
        Chat Wardrobe Prefix: '&5[&dWard ...
        ^
    expected <block end>, but found Scalar
    in 'string', line 6, column 39:
         ... e on disabled world: '&5You can't use this command!'
                                             ^
    
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:214) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:162) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at me.bronzzze.wardrobe.Main.<init>(Main.java:21) [Wardrobe.jar:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.7.0_75]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [?:1.7.0_75]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [?:1.7.0_75]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) [?:1.7.0_75]
        at java.lang.Class.newInstance(Unknown Source) [?:1.7.0_75]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:744) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.Bukkit.reload(Bukkit.java:534) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:646) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchServerCommand(CraftServer.java:632) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.aM(DedicatedServer.java:353) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:317) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at java.lang.Thread.run(Unknown Source) [?:1.7.0_75]
    Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
    in 'string', line 1, column 1:
        Chat Wardrobe Prefix: '&5[&dWard ...
        ^
    expected <block end>, but found Scalar
    in 'string', line 6, column 39:
         ... e on disabled world: '&5You can't use this command!'
                                             ^
    
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:226) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:400) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) ~[spigot_server.jar:git-Spigot-bf0ac55-3ee97a3]
        ... 24 more
    Config:
    HTML:
    Chat Wardrobe Prefix: '&5[&dWardrobe&5] '
    # Send message when you open wardrobe? true/false
    Main Menu Message: false
    Message when you open Main Menu: '&5Opening Wardrobe!'
    Message when you select Hat: '&5Hat Selected!'
    
    
    
    # When Player Join true = add a wardrobe chest false = don't add a wardrobe chest.
    On Join: false
    # Which slot in inventory should be set.
    Slot: 8
    # Enchantments on Armour? True/False.
    Enchantments: true
    # Close Inventory when you select armour/hat?
    Inventory Close: true
    # Reset armour when player leave?
    On Quit: true
    Enchantments on Discoarmour: true
    # On which world should command /wardrobe work?
    Worlds:
    - world
    - world_nether
    # When you use command /wardrobe on not enabled worlds
    Message on disabled world: '&5You can't use this command!'
    # When you use wardrobe chest on not enabled worlds
    Chest Message on disabled world: '&1You can't use wardrobe chest!'
     
  2. Offline

    FisheyLP

    bronzzze likes this.
  3. Offline

    bronzzze

    OHH i am so dumb:D
     
  4. Offline

    mrCookieSlime Retired Staff

    Moved to Alternatives Section.
     
Thread Status:
Not open for further replies.

Share This Page