InvalidPluginException

Discussion in 'Plugin Development' started by narrowtux, Feb 7, 2011.

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

    narrowtux

    Hi,
    I'm a totally newbie at both Plugins for Bukkit and Java too. But I'm not unexperienced with C++, so I thought, I'd get it.

    I'm using the Bukkit-Plugin-Generator to create an Eclipse project for me. I implemented the basic plugin class as well as the PlayerListener and the BlockListener.
    I export the whole thing as a Jar file and place it into my Plugins-Folder of the current craftbukkit. After loading, I get this error:
    Code:
    07.02.2011 20:11:07 org.bukkit.plugin.SimplePluginManager loadPlugins
    SEVERE: Could not load plugins/DropChest.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:78)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:117)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:82)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:48)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:167)
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:154)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:106)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:202)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Caused by: java.lang.ClassNotFoundException: com.bukkit.narrowtux.DropChest
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:72)
        ... 8 more
    I attach the whole Project in the ZIP-File
     

    Attached Files:

  2. Offline

    Redecouverte

    your plugin.yml is wrong

    you have currently:
    Code:
    name: DropChest
    main: com.bukkit.narrowtux.DropChest
    version: 0.1
     
    it should be:
    Code:
    name: DropChest
    main: com.bukkit.narrowtux.DropChest.DropChest
    version: 0.1
    
    -> you have to specify the class name, not just the package
     
  3. Offline

    narrowtux

    Thank you! That helped a lot. Maybe I'll adjust the Wiki-Page for creating a Plugin.
     
  4. Offline

    WALK2222

    Ugh dang does anyone know where I would change the class name on a mac?
     
  5. Offline

    ZNickq

    I started reading from the first post,and i was like...narowtux, newbie at plugins? the hell?
    Seriously,try not to bump ancient threads...
    And you change a class's name by selecting it in the IDE and pressing CTRL+R!
     
  6. Lol me too I was like WTF?
     
  7. Offline

    narrowtux

    thank you for bumping it -.-
     
    Mikhos likes this.
  8. Offline

    WALK2222

    But on a mac?
     
  9. Offline

    narrowtux

    CMD-ALT-R
    Look in the Source and Refactor menu if you're unsure about shortcuts.
     
  10. Offline

    WALK2222

    Can someone please give me step by step instructions on how to fix this for mac thank you so much! I've been looking everywhere
     
Thread Status:
Not open for further replies.

Share This Page