Development Assistance Help with the plugin.yml

Discussion in 'Plugin Help/Development/Requests' started by Relocated, Mar 28, 2016.

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

    Relocated

    Hello, I am coding a plugin with Java 7 and Spigot 1.8.8, and I have just started coding and need some assistance with the plugin.yml file.
    It is made, but the console shows that it doesn't have a plugin.yml.

    Code:
    28.03 17:04:10 [Server] INFO ... 6 more
    28.03 17:04:10 [Server] INFO Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    28.03 17:04:10 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.8.0_05]
    28.03 17:04:10 [Server] INFO at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:564) [paperspigot.jar:git-Paper-459]
    28.03 17:04:10 [Server] INFO at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:205) [paperspigot.jar:git-Paper-459]
    28.03 17:04:10 [Server] INFO at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugins(CraftServer.java:290) [paperspigot.jar:git-Paper-459]
    28.03 17:04:10 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) [paperspigot.jar:git-Paper-459]
    28.03 17:04:10 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[paperspigot.jar:git-Paper-459]
    28.03 17:04:10 [Server] INFO org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    28.03 17:04:10 [Server] ERROR Could not load 'plugins/MyWebsite.jar' in folder 'plugins'
    Here is my plugin.yml:
    Code:
    main: com.relocated.mywebsite.myweb
    version: 1.0
    name: MyWebsite
    And here is my main class file:
    Code:
     package com.relocated.mywebsite;
    
    import java.util.logging.Logger;
    
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class myweb extends JavaPlugin{
    
        public void onEnable() {
            PluginDescriptionFile pdfFile = getDescription();
            Logger logger = Logger.getLogger("Minecraft");
           
            logger.info(pdfFile.getName() + " has been enabled (V."+ pdfFile.getVersion() + ")");
        }
        
        public void onDisable() {
            PluginDescriptionFile pdfFile = getDescription();
            Logger logger = Logger.getLogger("Minecraft");
           
            logger.info(pdfFile.getName() + " has been disabled (V."+ pdfFile.getVersion() + ")");
        }
    }
     
  2. Offline

    BizarrePlatinum

    @Relocated this is likely due to the location of your plugin.yml. It should be located outside any packages; directly inside the project.
     
  3. Offline

    Lolmewn

    Is the plugin.yml included in the jar? You should see it directly when opening the jar as a zip.
     
Thread Status:
Not open for further replies.

Share This Page