Solved org.bukkit.plugin.InvalidDescriptionException: main is not defined

Discussion in 'Spigot Plugin Development' started by nktfh100, Apr 15, 2017.

Thread Status:
Not open for further replies.
  1. * im new at java*
    so i made my first plugin (very simple) and i got this error:
    Code (Text):
    org.bukkit.plugin.InvalidDescriptionException: main is not defined
            at org.bukkit.plugin.PluginDescriptionFile.loadMap( ~[spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.plugin.PluginDescriptionFile.<init>( ~[spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at ~[spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins( [spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins( [spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at net.minecraft.server.v1_11_R1.DedicatedServer.init( [spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at [spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            at Source) [?:1.8.0_121]
    Caused by: java.lang.NullPointerException
            at org.bukkit.plugin.PluginDescriptionFile.loadMap( ~[spigot-1.11.2-R0.1-SNAPSHOT.jar:git-Spigot-54ec0b8-ac405c3]
            ... 7 more

    the code:

    Code (Text):


    public class Main extends JavaPlugin {
        public void onEnable() {
            System.out.print("[test] Starting!");
        public void onDisable() {
            System.out.print("[test] Stopping!");

    Code (Text):
    name: wow
    version: 1.0



    what i have done wrong??
    please help me
    btw my english is bad so..
    #1 nktfh100, Apr 15, 2017
    Last edited: Apr 17, 2017
  2. Code (Text):
    should be
    Code (Text):
    with a lowercase m
    • Agree Agree x 1
  3. omfg bro thanks!!!!!!!!
    you are the best! :D
    • Funny Funny x 1
  4. just sayin you should mark this as solved ;)
    • Agree Agree x 2
  5. Also, take a look at , it could be useful to you in the future. Remember ALWAYS that
    Code (Text):
    public static Integer playerAmount = 0;
    is not the same as
    Code (Text):
    public static Integer playeramount = 0
    and the second one disrespects the Java naming conventions.

    Java is case-sensitive.
  6. but in the video i saw he made it Main..
    but thanks anyway
Thread Status:
Not open for further replies.