2

Before you mark this as a duplicate I have already searched through every single once I could find and none of the answers worked. This is my code in eclipse:

package me.[my mc uname].myplugin;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    public void onEnable() {

    }

}

Getting this error on line 3: The type org.bukkit.plugin.java.JavaPlugin is not accessible

Yes i have the spigot api in my build path (spigot-1.15.2.jar)

I am running Java 64 bit 1.8.0, eclipse 64 bit 4.15, and windows 10 64 bit

  • I have tried removing JavaPlugin and was getting the same error

  • I have tried restarting my computer/eclipse/refreshing the script

I dont know what to do

PythonNerd
  • 57
  • 1
  • 8
  • 2
    If you have a `module-info.java` file, delete it (or learn about [JPMS](https://en.wikipedia.org/wiki/Java_Platform_Module_System)). Otherwise, what gives you Ctrl+1 in the line with the error? – howlger Apr 27 '20 at 21:06
  • It worked! Thanks you so much! – PythonNerd Apr 27 '20 at 21:43
  • Great. For details see https://stackoverflow.com/a/60447530/6505250 – howlger Apr 27 '20 at 21:51
  • @howlger thanks!! you should make your comment become an answer ;) . i spent many times searching for this and your solution worked. – i'm ashamed with what i asked Nov 03 '20 at 14:21
  • Well, in this case, I think it's a duplicate. But without knowing the reason it is difficult to find the solution since there are too many other "is not accessible" errors. – howlger Nov 03 '20 at 14:39

0 Answers0