Plugin.yml Not Working

Discussion in 'Plugin Development' started by Fishchunks, May 19, 2012.

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

    Fishchunks

    Hi, first off don't yell at me please, I know this gets posted here a lot but I've tried googling it and it still doesn't work but I will try providing as much information as possible.

    The issue is that it won't recognise my class (ClassNotFound)

    Here is my Plugin.yml
    Code:
    name: SimpleMOTD
    description: Lets you configure a login message and rules.
    version: 0.1.0
    main: com.infamousdiamond.SimpleMOTD.SimpleMOTD
    commands:
        motd:
            description: Shows you the MOTD
            usage: /motd
        rules:
            description: Lists the server rules
            usage: /rules
    #Unimplemented
        edit-motd:
            description: Shows you the MOTD
            usage: /edit-motd
        edit-rules:
            description: Edits the server rules
            usage: /edit-rules
    Here is a picture showing you Eclipse so you can see how its all structured.
    [​IMG]
    Also, can you help me figure out the issue with the playerJoin method, Its from a tutorial I followed (I'm primarily a web dev but thought I should learn something new.) I've tried a few things but it won't work, here is a copy of the SimpleMOTD.class file.

    http://pastebin.com/5REzbKUH

    P.S. MOTD.YML is never used.

    P.P.S. Here is the log.
    Code:
    2012-05-19 12:56:56 [SEVERE] Could not load 'plugins/SimpleMOTD.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: com.infamousdiamond.SimpleMOTD.SimpleMOTD
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:422)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.ClassNotFoundException: com.infamousdiamond.SimpleMOTD.SimpleMOTD
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:139)
        ... 8 more
     
  2. Offline

    Craftiii4

    This here is not correct com.infamousdiamond.SimpleMOTD.SimpleMOTD because you made a package called that, each dot will try and get the next folder, split up your package for it to work.

    Should be like this

    [​IMG]
     
Thread Status:
Not open for further replies.

Share This Page