Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3151

Spigot is not correctly parsing YAML files.

XMLWordPrintable

      When loading the following configuration file:

      https://gist.github.com/stuntguy3000/27576af93e868a33baed108bf3bf2fdc

      Spigot throws this error - despite the YAML being valid. (www.yamllint.com, www.yaml-online-parser.appspot.com

      java.lang.IllegalArgumentException: Cannot set to an empty path
      at org.apache.commons.lang.Validate.notEmpty(Validate.java:321) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.MemorySection.set(MemorySection.java:167) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.MemorySection.set(MemorySection.java:201) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:79) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:77) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:77) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:77) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:67) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:184) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:130) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:179) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at me.stuntguy3000.[redacted].handler.ModuleHandler.getModuleConfig(ModuleHandler.java:89) ~[?:?]
      at me.stuntguy3000.[redacted].handler.ModuleHandler.load(ModuleHandler.java:37) ~[?:?]
      at me.stuntguy3000.[redacted].registerHandlers([redacted].java:28) ~[?:?]
      at me.stuntguy3000.[redacted].engine.MinecraftPlugin.onEnable(MinecraftPlugin.java:42) ~[?:?]
      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) ~[spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:376) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:326) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at net.minecraft.server.v1_11_R1.MinecraftServer.t(MinecraftServer.java:419) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at net.minecraft.server.v1_11_R1.MinecraftServer.l(MinecraftServer.java:380) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at net.minecraft.server.v1_11_R1.MinecraftServer.a(MinecraftServer.java:335) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:542) [spigot-1.11.2.jar:git-Spigot-7d78b81-27dd3ca]
      at java.lang.Thread.run(Unknown Source) R[?:1.8.0_121]

       

      Removing lines 7, 13, 19 and 25 allow the config to be loaded. 

            Unassigned Unassigned
            stuntguy3000 Luke Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: