Cannot Resolve Symbol 'Override' - IntelliJ Error

Discussion in 'Plugin Development' started by TheCoderGuy, Jan 3, 2015.

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

    TheCoderGuy

    Over the past day or two, I all of a sudden got an error on something I never got an error on before. In intellij, when I type @Override, it says it cannot resolve that symbol. I have used IntelliJ before, and have never gotten this error. And yes, I have done all of the basic stuff like importing craftbukkit and what not.

    The code is just like you would expect, just a normal onEnable class:
    Code:
    package main.java.com.thebyte.dragons;
    
    import main.java.com.thebyte.dragons.events.InventoryClick;
    import main.java.com.thebyte.dragons.events.JoinListener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class LobbyCore extends JavaPlugin {
    
        private static LobbyCore instance;
       
        @Override
        public void onEnable(){
            instance = this;
    
            getServer().getPluginManager().registerEvents(new JoinListener(), this);
            getServer().getPluginManager().registerEvents(new InventoryClick(), this);
        }
    
        public static LobbyCore getInstance() {
            return instance;
        }
    }
    
    Any help would be awesome :D
     
  2. Offline

    leon3001

    @TheCoderGuy The Override annotation is a general Java annotation so that error is really weird … Shouldn't have to do anything with Bukkit. But did you import the correct JavaPlugin?

    EDIT: NVM, you did. Weird.
     
  3. Offline

    TGRHavoc

    You could have a look at this blog.. It may help.. May...
     
  4. Offline

    TheCoderGuy

    @TGRHavoc That blog did help me! :) I figured out the problem and I am fixing it right now.
     
Thread Status:
Not open for further replies.

Share This Page