Solved Abnormal Plugin Type Error

Discussion in 'Spigot Plugin Development' started by jusjus112, Apr 9, 2019.

  1. Hi guys,

    Normally I don't ask those questions. But since this error is new to me and the documentation on this specific error is just crap.

    So I got the following error onStartup "org.bukkit.plugin.InvalidPluginException: Abnormal plugin type"
    My setup:
    So yeah, I got an abstract main class what is going to be used in all the gamePlugins (Dependecies) in the near future.
    Code (Java):
    public abstract class Core extends JavaPlugin {
    I also have those methods within my main class. Those methods are called once the onEnable method is finished loading.

    Code (Java):
        public abstract void init();
        public abstract void deinit();
    But when I start the server it gives this exception. I've looked on other forums, and googled this error but people say it has to do with a constructor e.t.c. which is weird.

    I know one of you guys are saying it has to do with the abstract method, and you can't create abstract main classes. But that's incorrect since a co-worker and even myself have created this before. But never came up with this exception. Is it maybe possible that it has something to do with java versions or even minecraft versions?

    I hope one of you guys can help me out and see what your thoughts are.
  2. SteelPhoenix


    you can't initialize an abstract class because it's missing method bodies. You need to make a class extending Core and use that as your main class. You can still extend Core in other plugins.
  3. Thanks, I didn't know that was a thing. But anyways, I got it solved. Thanks again ;)