Im having this error, hopefully someone helps

Discussion in 'Plugin Development' started by HeavinXD, Apr 3, 2021.

  1. Offline

    HeavinXD

    Hi, Im new to bukkit development, and I wonder if you could help me with this bug, This is the error im getting:


    Code:
    [CODE][14:50:43] [Server thread/ERROR]: Cannot load plugins\WildLife\config.yml
    org.bukkit.configuration.InvalidConfigurationException: while scanning a simple key
    in 'string', line 5, column 3:
          x:100
          ^
    could not find expected ':'
    in 'string', line 6, column 3:
          y:100
          ^
    
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:59) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:188) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:157) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:133) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.heavin.wildlife.Config.<init>(Config.java:16) ~[?:?]
        at net.heavin.wildlife.Main.onEnable(Main.java:17) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:494) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:408) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:435) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:218) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at java.lang.Thread.run(Thread.java:832) [?:?]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a simple key
    in 'string', line 5, column 3:
          x:100
          ^
    could not find expected ':'
    in 'string', line 6, column 3:
          y:100
          ^
    
        at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:463) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:278) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:235) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:257) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:248) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:236) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:95) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:119) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:150) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:490) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:416) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        ... 17 more
    [14:50:43] [Server thread/ERROR]: Cannot load configuration from stream
    org.bukkit.configuration.InvalidConfigurationException: while scanning a simple key
    in 'string', line 5, column 3:
          x:100
          ^
    could not find expected ':'
    in 'string', line 6, column 3:
          y:100
          ^
    
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:59) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:217) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:133) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.heavin.wildlife.Config.<init>(Config.java:16) ~[?:?]
        at net.heavin.wildlife.Main.onEnable(Main.java:17) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:494) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:408) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:435) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:218) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at java.lang.Thread.run(Thread.java:832) [?:?]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a simple key
    in 'string', line 5, column 3:
          x:100
          ^
    could not find expected ':'
    in 'string', line 6, column 3:
          y:100
          ^
    
        at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:463) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:278) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:235) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:257) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:248) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:236) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:95) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:119) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:150) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:490) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:416) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:57) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        ... 16 more
    [14:50:43] [Server thread/ERROR]: Error occurred while enabling WildLife v1.0 (Is it up to date?)
    java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
        at net.heavin.wildlife.Config.getArenaAmount(Config.java:55) ~[?:?]
        at net.heavin.wildlife.Manager.<init>(Manager.java:14) ~[?:?]
        at net.heavin.wildlife.Main.onEnable(Main.java:19) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:494) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:408) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:435) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:218) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at java.lang.Thread.run(Thread.java:832) [?:?]
    [14:50:43] [Server thread/INFO]: [WorldEdit] Enabling WorldEdit v6.1;no_git_id
    [14:50:44] [Server thread/INFO]: WEPIF: Using the Bukkit Permissions API.
    [14:50:44] [Server thread/ERROR]: Error occurred while enabling WorldEdit v6.1;no_git_id (Is it up to date?)
    java.lang.IllegalArgumentException: Channel must contain : separator (attempted to use WECUI)
        at org.bukkit.plugin.messaging.StandardMessenger.validateAndCorrectChannel(StandardMessenger.java:503) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.messaging.StandardMessenger.registerIncomingPluginChannel(StandardMessenger.java:216) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:108) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:494) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:408) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:435) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:218) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
        at java.lang.Thread.run(Thread.java:832) [?:?]
    [/code]
    This is my config.yml file

    Code:
    required-players: 3
    contdown-seconds: 30
    lobby-spawn:
      world: 'world'
      x: 100
      y: 20
      z: 100
      pitch: 60
      yaw: 60
    arenas:
      1:
        world: 'world'
        x: 100
        y: 100
        z: 100
        pitch: 100
        yaw: 100
      2:
        world: 'world'
        x: 100
        y: 100
        z: 100
        pitch: 100
        yaw: 100
    hope someone could help!
     
    Last edited by a moderator: Apr 3, 2021
  2. Offline

    KarimAKL

    @HeavinXD It seems like you did not have a space in an earlier version of your config.yml. You are also trying to loop keys of a value that is not a section.
     
  3. Offline

    HeavinXD

    So what do i change in my config?
     
  4. Offline

    KarimAKL

    I do not think you need to change your config, but the code trying to get values from the config.
     
  5. Offline

    Newdel

    You are using a config anywhere, that has no whitespace behind the : (tested it, that's the problem)
    Search it and change it
     

Share This Page