does not extend JavaPlugin

Viewed 409

I tried everything and still it does not work... https://paste.md-5.net/pucopakofa.http (btw I used two spaces instead of a tab) In the first paragraph you can see a plugin.yml file and in the second paragraph you can see Main class, and in case I uploaded code in the third paragraph...

it shows me this:

org.bukkit.plugin.InvalidPluginException: main class `org.emisdevs.ChatCommand.Main' does not extend JavaPlugin
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:73) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: java.lang.ClassCastException: class org.emisdevs.ChatCommand.Main
        at java.lang.Class.asSubclass(Unknown Source) ~[?:1.8.0_241]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:71) ~[spigot.jar:git-Spigot-db6de12-18fbb24]```
1 Answers

First thing, try to Stop the server, don’t reload it, stop it, remove the Plugin and rerun it. Second thing, try to run it on a test server without any others plugins, if it works there, you just need to rename the Mainpath. Third thing, check if your dependencies are uptodate or even installed. Check your Projects properties, Build Path and the external jars.

Let me know if this worked.

Related