Plugin.yml troubles :(

Discussion in 'Plugin Development' started by Pizza371, Jun 28, 2013.

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

    Pizza371

    Ok so I started a plugin, but when I start the server up I get this error

    InvalidPluginException: ClassCastException: class me.pizza371.cTrack.Main
    My package name is me.pizza371.ctrack
    And my main class is Main..
    my plugin.yml:
    name: cTrack
    version: 1.0
    main: me.pizza371.ctrack.Main
    Can anyone help? I've re-created the plugin.yml multiple times.. and it wont work :( thanks..
     
  2. Offline

    Seadragon91

    Please post your main clas.
     
  3. Offline

    Pizza371

    Code:
    package me.naloplop.ctrack;
     
    public class Main {
     
        public void onEnable() {
           
            System.out.println("cTrack v1.0 Enabled!");
           
        }
       
        public void onDisable() {
           
            System.out.println("cTrack v1.0 Disabled!");
           
        }
    }
    
    It's a simple class with nothing in it, do I need to register something?
     
  4. Offline

    marti.2001

    Your main class needs to extend JavaPlugin.:)
     
  5. Offline

    Seadragon91

    Ok, I see the error. Change this:
    Code:
    public class Main {

    to:
    Code:
    public class Main extends JavaPlugin {
     
  6. Offline

    Pizza371

    Oh yeah, thanks a lot! :)
     
Thread Status:
Not open for further replies.

Share This Page