java.lang.IllegalStateException: Initial initialization

Discussion in 'Spigot Plugin Development' started by TheCreeperCow, Jun 11, 2017.

  1. Mas

    Mas

    In your Utils class you have the line "private static Plugin plugin = new Main();"
    Remove this, as you cannot create a second instance of your plugin's main class.
     
  2. Oh bugger how else can i get the datafolder STATICALLY
     
  3. Mas

    Mas

    Get an instance of your main Plugin through Bukkit.getPluginManager().getPlugin(); or make a singleton getter for your main class.