1.12.2 config.yml error

Discussion in 'Spigot Plugin Development' started by gamer2007, Feb 26, 2020.

  1. pls help me i am making an config.yml but the server gives an error when he load the plugin



    [17:49:39 ERROR]: Error occurred while enabling Inventory v1.0 (Is it up to date?)
    java.lang.IllegalArgumentException: The embedded resource 'config.yml' cannot be found in plugins/Inventory-1.0.jar
    at org.bukkit.plugin.java.JavaPlugin.saveResource(JavaPlugin.java:195) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.plugin.java.JavaPlugin.saveDefaultConfig(JavaPlugin.java:182) ~[patched_1.12.2.jar:git-Paper-1618]
    at me.inventory.Inventory.onEnable(Inventory.java:24) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.reload(CraftServer.java:808) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.Bukkit.reload(Bukkit.java:559) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:55) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:152) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:685) ~[patched_1.12.2.jar:git-Paper-1618]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:648) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:463) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:424) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1618]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1618]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_232]
     
  2. You should just read the error: "The embedded resource 'config.yml' cannot be found in plugins/Inventory-1.0.jar"

    Have you made sure that the jar you create contains it?
     

  3. i have made it with intelij the tutorial on youtube says that the config.yml must be in recourses
    i have done that
     
  4. Can you send files structure?
     
  5. upload_2020-2-26_18-11-59.png
     
  6. You named it "conifg" Make sure is well written :)
     
    • Agree Agree x 2
    • Like Like x 1
    • Funny Funny x 1
  7. It does not have to be in a folder named "resources". You can even put it right outside the folder "src" and it'll still work, as long as you include it when you compile.
     
    • Agree Agree x 1
  8. thanks it works
     
  9. it does if you compile with maven.
     
  10. Could you please mark this thread as solved, so others know that you no longer need help?
     
  11. Should work when you put it in src
     
    • Optimistic Optimistic x 1