Solved Getting An error. the Method getVersion() is Undefined.

Discussion in 'Plugin Development' started by Rmarmorstein, Nov 28, 2012.

Thread Status:
Not open for further replies.
  1. Ok. So, i am making my plugin, following tutorials, and stuff, and i am getting this error in eclipse (it is on the side with the Lightbulb and the X)

    "The Method getVersion() is Undefined for the type ezDonor"

    it is where i have PluginDescriptionFile pdf = this.getVersion();

    Here is my Code...

    Code:
    package us.rivertech.ezdonor;
     
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.java.JavaPlugin;
    import java.util.logging.Logger;
     
    public final class ezDonor extends JavaPlugin {
     
        PluginDescriptionFile pdf = this.getVersion();
     
     
     
        @Override
        public void onEnable(){
       
            getLogger().info("ezDonor Enabled @ Version" + pdf.getVersion());
       
       
        }
     
    }
    I dont know how to do the fancy Code:java thing, i tried, can anyone tell me
     
  2. Rmarmorstein

    Change PluginDescriptionFile pdf = this.getVersion();

    To
    Code:java
    1.  
    2. PluginDescriptionFile pdfFile = getDescription();
    3.  


    and if u want to do put your code in java format.
    just remove the . in them
    [.syntax=java]
    [./syntax]
     
  3. Working Now

    Code:java
    1.  
    2. Thank You!
    3.  
     
Thread Status:
Not open for further replies.

Share This Page