Ordering Issue
Randude14 opened this issue ยท 2 comments
Hi,
I am having some errors with my plugin LotteryPlus. Apparently sometimes Essentials is being loaded up after my plugin which causes this error:
2012-02-29 12:44:41 [INFO] [LotteryPlus v0.5.4] - config loaded. 2012-02-29 12:44:41 [SEVERE] java.lang.RuntimeException: Essentials API is called before Essentials is loaded. 2012-02-29 12:44:41 [SEVERE] at com.earth2me.essentials.api.Economy.format(Economy.java:250) 2012-02-29 12:44:41 [SEVERE] at net.milkbowl.vault.economy.plugins.Economy_Essentials.format(Economy_Essentials.java:199) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.Plugin.format(Plugin.java:274) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.Lottery.formatPot(Lottery.java:357) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.Lottery.formatReward(Lottery.java:377) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.LotterySignFormatter.format(LotterySignFormatter.java:52) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.LotterySignFormatter.format(LotterySignFormatter.java:31) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.Lottery.updateSigns(Lottery.java:245) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.lottery.Lottery.readSavedData(Lottery.java:164) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.LotteryManager.loadLotteries(LotteryManager.java:142) 2012-02-29 12:44:41 [SEVERE] at com.randude14.lotteryplus.Plugin.onEnable(Plugin.java:116) 2012-02-29 12:44:41 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230) 2012-02-29 12:44:41 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1057) 2012-02-29 12:44:41 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:380) 2012-02-29 12:44:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:199) 2012-02-29 12:44:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:182) 2012-02-29 12:44:41 [SEVERE] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:357) 2012-02-29 12:44:41 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:344) 2012-02-29 12:44:41 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175) 2012-02-29 12:44:41 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) 2012-02-29 12:44:41 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) 2012-02-29
What should i do?
@Randude14 let me know if you need anymore help with this, if you're on IRC I'm usually online in #Heroes #spout or #bukkitdev
you shouldn't reference any economy or other information until AFTER the server has finished loading. The provider is registered, but they aren't safe to use until the server has completed it's startup process. You'll most likely need to move some of your stuff that finishes the economy setup etc to a scheduled task.