Plugin not starting up.

Discussion in 'Plugin Development' started by Tzahi, Jul 8, 2012.

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

    Tzahi

    Source is at the bottom, but I didn't want to waste your time reading the source when it could be another stupid mistake.

    Whenever I try to start up my plugin, it gives me an error:

    Error with TCPack: me.tzahi.TCPack (check console for more details)

    In the console, it says this:

    Code:
    1:29:40 PM [SEVERE] org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: me.tzahi.TCPack
    1:29:40 PM [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:151)
    1:29:40 PM [SEVERE]    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    1:29:40 PM [SEVERE]    at im.mcft.pluginreloader.PluginReloader.loadPlugin(PluginReloader.java:218)
    1:29:40 PM [SEVERE]    at im.mcft.pluginreloader.PluginReloader.onCommand(PluginReloader.java:83)
    1:29:40 PM [SEVERE]    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    1:29:42 PM [SEVERE]    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    1:29:42 PM [SEVERE]    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
    1:29:42 PM [SEVERE]    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
    1:29:42 PM [SEVERE]    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
    1:29:42 PM [SEVERE]    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    1:29:42 PM [SEVERE]    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
    1:29:42 PM [SEVERE]    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    1:29:43 PM [SEVERE]    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
    1:29:43 PM [SEVERE]    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    1:29:43 PM [SEVERE]    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567)
    1:29:43 PM [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
    1:29:44 PM [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    1:29:44 PM [SEVERE] Caused by: java.lang.ClassNotFoundException: me.tzahi.TCPack
    1:29:44 PM [SEVERE]    at java.net.URLClassLoader$1.run(Unknown Source)
    1:29:44 PM [SEVERE]    at java.net.URLClassLoader$1.run(Unknown Source)
    1:29:44 PM [SEVERE]    at java.security.AccessController.doPrivileged(Native Method)
    1:29:45 PM [SEVERE]    at java.net.URLClassLoader.findClass(Unknown Source)
    1:29:45 PM [SEVERE]    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
    1:29:45 PM [SEVERE]    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
    1:29:45 PM [SEVERE]    at java.lang.ClassLoader.loadClass(Unknown Source)
    1:29:45 PM [SEVERE]    at java.lang.ClassLoader.loadClass(Unknown Source)
    1:29:45 PM [SEVERE]    at java.lang.Class.forName0(Native Method)
    1:29:45 PM [SEVERE]    at java.lang.Class.forName(Unknown Source)
    1:29:46 PM [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140)
    1:29:46 PM [SEVERE]    ... 16 more
    
    Here is my setup with locations of libraries, classes, and the plugin.yml:

    [​IMG]

    And my plugin.yml:

    Code:
    name: TCPack
    version: 0.1
    main: me.tzahi.TCPack
    author: Tzahi
    commands:
        time:
            description: Sets your time.
            usage: /<command>
        fake:
            description: Stuffy stuff.
            usage: /<command>
    And finally, my source code:

    http://pastebin.com/0xjssvWb

    Thank you =)
     
  2. Offline

    Milkywayz

  3. Offline

    kumpelblase2

  4. Offline

    McLuke500

    Tzahi

    You did the main wrong you did me.tzahi.TCPack Which is the package but you need to put the main class aka the one called TCPack.java You do do it as
    me.tzahi.TCPack.TCPack But dont add .java on the end :D

    Hope it helped and also read the guides kumpel and Milkywayz Posted :D
     
  5. Offline

    Tzahi

    It loads! thank you so much!!! now to troubleshoot the command errors, lol.
     
  6. Offline

    Darksonn

    Also, this is just something that makes it easyer to see your code: packages, methods and variables should start with lowercase classes with uppercase
     
Thread Status:
Not open for further replies.

Share This Page