strumswell / ServerlistMOTD-X

A plugin for the Spigot API. ServerlistMOTD allows users to change their serverlist motd.
Other
29 stars 3 forks source link

Config Errors for some reason #59

Closed RAINRAINRAINRAINRAINRAINRAINRAINRAIN closed 7 months ago

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 7 months ago

Describe the bug

sl reload
[09:37:41 ERROR]: Cannot load plugins/ServerlistMOTD/config.yml
org.bukkit.configuration.InvalidConfigurationException: while parsing a block collection
 in 'reader', line 21, column 5:
        - "<g:#ffe28f:#f4f8f1:#ffe28f>&l ... 
        ^
expected <block end>, but found '<scalar>'
 in 'reader', line 251, column 8:
        - "<g:#ffe28f:#f4f8f1:#ffe28f>&lVan ... 
           ^
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:111) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:309) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:179) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at cloud.bolte.serverlistmotd.SpigotConfig.reloadSmotdConfig(SpigotConfig.java:397) ~[ServerlistMOTD.jar:?]
        at cloud.bolte.serverlistmotd.cmd.Serverlist.onCommand(Serverlist.java:43) ~[ServerlistMOTD.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand() ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand() ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-40]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block collection
 in 'reader', line 21, column 5:
        - "<g:#ffe28f:#f4f8f1:#ffe28f>&l ... 
        ^
expected <block end>, but found '<scalar>'
 in 'reader', line 251, column 8:
        - "<g:#ffe28f:#f4f8f1:#ffe28f>&lVan ... 
           ^
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockSequenceEntryKey.produce(ParserImpl.java:548) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:57) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:43) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:136) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:116) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeScalarNode(Composer.java:241) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:205) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:277) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:207) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:369) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:348) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:323) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:369) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:348) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:323) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:131) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:157) ~[snakeyaml-2.2.jar:?]
        at org.yaml.snakeyaml.Yaml.compose(Yaml.java:575) ~[snakeyaml-2.2.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:104) ~[pufferfishplus-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 16 more
[09:37:41 INFO]: ServerlistMOTD > Config reloaded!

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Config https://gist.github.com/RAINRAINRAINRAINRAINRAINRAINRAINRAIN/4f18bc1cbbf54fcd9e154e1f73f5276f

Versions (please complete the following information):

Additional context Add any other context about the problem here.

strumswell commented 7 months ago

I really have no time to solve your issue more in-depth. But after a quick scan, try to remove the \ afterfly from line 250

    - "<g:#ffe28f:#f4f8f1:#ffe28f>&lVanilla Playground - &o&l1.20.4 No Hacks Anarchy%line%<g:#edc5f1:#e5b0d9>whos admin becouse i can fly\"

That's probably illegal as it might escape the " and fuck with the YAML ruleset.

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 7 months ago

Thank you!