ServerListPlus config errors

Discussion in 'Plugin Development' started by brinsley_, Oct 10, 2017.

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

    brinsley_

    Hi, I have just setup serverlistplus and no one else seems to have issues with it. I have tried looking everywhere and it says its just an error in the config.yml. Im sure im missing something stupid and have just spent hours being an idiot but thanks to anyone in advance.

    Here is my console error:
    Code:
    [20:33:05 INFO]: [ServerListPlus] Enabling ServerListPlus v3.4.7
    [20:33:05 INFO]: [ServerListPlus] [Core] Reloading configuration...
    [20:33:05 WARN]: [ServerListPlus] [Core] Unable to parse a part of the configuration. Make sure the YAML syntax is valid!
    org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
    in 'reader', line 36, column 3:
          Description:
          ^
    expected <block end>, but found BlockEntry
    in 'reader', line 48, column 3:
          - |-
          ^
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:226) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:231) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:84) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:104) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:502) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecrell.serverlistplus.core.ConfigurationManager.reload(ConfigurationManager.java:96) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.reload(ServerListPlusCore.java:186) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.<init>(ServerListPlusCore.java:135) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.<init>(ServerListPlusCore.java:87) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.bukkit.BukkitPlugin.onEnable(BukkitPlugin.java:139) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
    [20:33:05 ERROR]: [ServerListPlus] [Core] Unable to parse the configuration. Make sure the YAML syntax is correct!
    org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
    in 'reader', line 35, column 1:
        Default:
        ^
    expected <block end>, but found BlockEntry
    in 'reader', line 48, column 3:
          - |-
          ^
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.composer.Composer.checkNode(Composer.java:68) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.constructor.BaseConstructor.checkData(BaseConstructor.java:93) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.yaml.snakeyaml.Yaml$1.hasNext(Yaml.java:498) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecrell.serverlistplus.core.ConfigurationManager.reload(ConfigurationManager.java:93) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.reload(ServerListPlusCore.java:186) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.<init>(ServerListPlusCore.java:135) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.core.ServerListPlusCore.<init>(ServerListPlusCore.java:87) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at net.minecrell.serverlistplus.bukkit.BukkitPlugin.onEnable(BukkitPlugin.java:139) [ServerListPlus-3.4.7-Bukkit-1.8.jar:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
    [20:33:05 INFO]: [ServerListPlus] Please fix the error before restarting the server!
    [20:33:05 INFO]: [ServerListPlus] Disabling ServerListPlus v3.4.7
    [20:33:05 ERROR]: Error occurred while disabling ServerListPlus v3.4.7 (Is it up to date?)
    and my config.yml:
    Code:
    #      _____                     __    _     _   _____ _
    #     |   __|___ ___ _ _ ___ ___|  |  |_|___| |_|  _  | |_ _ ___
    #     |__   | -_|  _| | | -_|  _|  |__| |_ -|  _|   __| | | |_ -|
    #     |_____|___|_|  \_/|___|_| |_____|_|___|_| |__|  |_|___|___|
    #
    # ServerListPlus v3.4.7 - http://git.io/slp
    
    # More information is available in the Wiki: http://git.io/slp-wiki
    
    
    # This is the section where you can customize your server status ping!
    #  - Default is the section for the status used when the player name is unknown.
    #    Personalized is used if the client has already joined the server once.
    #    Use %player% as placeholder for the player's name.
    #
    # Features:
    #  - Description (MotD): A short status message for your server, max. 2 lines.
    #  - Players:
    #    - Hover: The player hover message that is displayed if you hover the player count.
    #    - Slots: Custom player slot formatting, see http://git.io/slp-slots
    #  - Favicon:
    #    - Use multiple server icons or the player's head as favicon, see http://git.io/oMhJlg
    #    - Possible favicon sources: Files, Folders, URLs, Heads, Helms, Encoded
    #
    #  More features are explained in the Wiki: http://git.io/slp-config
    #
    # Usage:
    #  - Add multiple entries for random messages.
    #  - Save the file with valid UTF-8 encoding for special characters.
    #  - Available placeholders:
    #    - Player name: %player%
    #    - Player count: %online%, %max%, %online@server% %online@world%
    #    - Random online player name: %random_player%
    --- !Status
    Default:
      Description:
      - |-
        &2&l&m===========&r  &5&lWelcome &lto &1&lDJ&3&lMC&4!  &2&l&m===========
        &4&l&m=====&r  &l&f&k! &r&l&f»  &6&lCOME &lJOIN &3&l&nOPFACTIONS&r &6&lNOW!!  &l&f&k! &r&l&f»  &r&4&l&m=====
      - |-
       &2&l&m===========&r  &5&lWelcome &lto &1&lDJ&3&lMC&4!  &2&l&m===========
       &4&l&m=====&r  &l&f&k! &r&l&f»  &6&lCOME &lJOIN &3&l&nOPFACTIONS&r &6&lNOW!!  &l&f&k! &r&l&f»  &r&4&l&m=====
      Players:
        Slots:
        - '&7» &6&l%online%&c&l/&6&l%max%'
      Players:
        Hover:
      - |-
        &aWelcome to &1&lDJ&3&lMC&4!
          - &aFactions: &e%online%/250 players online
        &aShop: DJMC
    Personalized:
      Description:
      - |-
        &2&l&m===========&r  &5&lWelcome &lto &1&lDJ&3&lMC&4!  &2&l&m===========
        &4&l&m=====&r  &l&f&k! &r&l&f»  &6&lCOME &lJOIN &3&l&nOPFACTIONS&r &6&lNOW!!  &l&f&k! &r&l&f»  &r&4&l&m=====
      - |-
       &2&l&m===========&r  &5&lWelcome &lto &1&lDJ&3&lMC&4!  &2&l&m===========
       &4&l&m=====&r  &l&f&k! &r&l&f»  &6&lCOME &lJOIN &3&l&nOPFACTIONS&r &6&lNOW!!  &l&f&k! &r&l&f»  &r&4&l&m===== 
      Players:
        Slots:
        - '&aHey, %player%! &7» &6&l%online%&c&l/&6&l%max%'
      Players:
        Max:
        - 1000
        - 2000
        - 3000
        # Ranges are also possible
        # A number from 1000 to 10000
        - 1000..10000
      Players:
        Hover:
      - |-
        &aWelcome back, &l%&lplayer%&a to &1&lDJ&3&lMC&4!
        &aCurrently &e&l%online% &aplayers are playing on our server!
      Version:
        Name:
        - '&aPlease download &lMinecraft 1.12 &ato play on &1&lDJ&3&lMC&a!'
    
    # Stats: Enable/disable sending plugin statistics.
    # PlayerTracking: Enable/disable tracking of player names to their IP-Addresses.
    #   - Persistence can be disabled with the toggle in the Storage section.
    # Samples: Toggle using multiple player infos for the player hover message.
    #     May prevent the annoying ... and x more ... message for bigger servers
    #     DynamicPlayers is special and aligns the number with the number of
    #     random players used in placeholders.
    # Unknown: Placeholder replacement if the real value is unknown.
    # Favicon: Options for the creation / downloading of favicons:
    #  - RecursiveFolderSearch: Also search for favicons in sub directories.
    #  - SkinSource: The URL to get the Minecraft Skins from. (%s -> player name)
    #  - ResizeStrategy: The strategy used to resize too small or too big favicons.
    #      NONE (keep them as is, will probably fail), SCALE (scale them to the correct size)
    --- !Plugin
    Stats: true
    PlayerTracking:
      Enabled: true
      Storage: !JSONStorage
        Enabled: true
        SaveDelay: 5m
    Samples:
      Multiple: false
      DynamicPlayers: false
    Unknown:
      PlayerName: player
      PlayerCount: ???
      Date: ???
      Favicon:
        URLs:
        - https://visage.surgeplay.com/bust/64/%_uuid_%
    I hope someone can help me with this because I honestly dont know whats wrong xD. thanks.
     
  2. Offline

    Caderape2

    @brinsley_
    A configuration file is not a text. I guess Description is a string list. It should look like this
     
  3. Offline

    Zombie_Striker

    @brinsley_
    To add on to what @Caderape2 posted, you can't have multiple lines for the same entry in the config. (which is what it looks like you are doing). Merge everything below the dashed line into one line, and use \n if you need a new line for the message.
     
  4. Offline

    Minecrell

    For reference, YAML supports multiple lines using literal style blocks:

    Code:
    test: |-
      aa
      bb
    .. results in a value of "aa\nbb" for test.

    @brinsley_ Your configuration is basically correct, only the indentation is wrong. You're missing spaces on several lines. I've added them here to show which changes you need to make: https://gist.github.com/Minecrell/8...visions#diff-b67b8c46775020254e42fba73b4d0755

    The fixed config is at https://gist.github.com/Minecrell/8a5c5492ab4f69fb3cb1f01cba1a998b#file-serverlistplus-yml

    Additional note: You put the Favicon in the wrong place: https://gist.github.com/Minecrell/8a5c5492ab4f69fb3cb1f01cba1a998b#file-serverlistplus-yml-L107-L109. This must be together with the other stuff at the top of the configuration file. Take a look at the example configuration to see how it needs to look: https://github.com/Minecrell/ServerListPlus/wiki/Examples#configuration
     
Thread Status:
Not open for further replies.

Share This Page