Solved Odd error in package declaration in main plugin class

Discussion in 'Spigot Plugin Development' started by LeeTheENTP, Oct 6, 2015.

  1. I recently picked back up on coding plugins, but within a few minutes of setting up the workspace I have encountered an error I am not sure how to resolve.

    When I hover over the underlined text (the package declaration) in the main class, I am alerted of this error:


    I have not seen this before, and searching online has not returned any useful information. I have tried using both Java 8u60 and 7u80, but the error appears with both. I have Bukkit 1.8.8 snapshot as a referenced library.
  2. I have had this issue. I could not resolve it but delete the class and try again
  3. Unfortunately this did not fix the issue.

    After looking into what is causing the error, it appears to be the "extends JavaPlugin" part of the main class declaration. Is this a known issue in newer builds of Bukkit?
  4. @MuricaGaming I have no idea. I'm not the best at coding so I don't know. I have had this issue before though.
  5. @MuricaGaming make sure you correctly have CraftBukkit imported.
  6. Did you import the wrong JavaPlugin class?
  7. I've imported
    #7 LeeTheENTP, Oct 6, 2015
    Last edited: Oct 7, 2015
  8. A quick google search (I see people with this problem a lot):
    It says one of the dependencies is outdated. Import the shaded jar. And why not use the Spigot-API instead of Bukkit? Spigot-API is Bukkit with just a little more content for 1.8.