JavaPlugin problem

Discussion in 'Plugin Development' started by retsrif, Feb 6, 2011.

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

    retsrif

    Hey when I try to extend my plugin class to JavaPlugin it says:
    cannot find symbol
    symbol : constructor JavaPlugin()
    location: class org.bukkit.plugin.java.JavaPlugin

    Any help? I know, noobish question :)
     
  2. Offline

    eisental

    You have to write a constructor for the plugin class and call the JavaPlugin constructor:
    Code:
    public <Your JavaPlugin class name>(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File folder, File plugin, ClassLoader cLoader) {
            super(pluginLoader, instance, desc, folder, plugin, cLoader);
        }
    
    Replace the <Your JavaPlugin class name> with the class name.

    EDIT: and maybe this is a good opportunity to say how much having a constructor in JavaPlugin sucks. I find myself copy/pasting it for every new plugin, usually without adding any code except the super() call.
     
  3. Offline

    retsrif

    OMG! I am sorry for wasting your time. I already had the constructor on there. I thought something as wrong with the plugin file. Turns out, I had an extra letter in the plugin name. :p
     
Thread Status:
Not open for further replies.

Share This Page