Hello, I don't know what went wrong exactly, there are no errors in my code and the error doesn't seem to refer to anything specific in my code. It says that it's something with my config.yml (that it's a null), but I don't see anything wrong with it. The error: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler 19:41:37 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.6-R0.3 -5-g82c58b5-b2590jnks (MC: 1.4.6) (Implementing API version 1.4.6-R0.4-SNAPSHOT) 19:41:37 [SEVERE] Could not load 'plugins\Lottery.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Fi le cannot be null at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j ava:182) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager. java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager .java:230) at org.bukkit.craftbukkit.v1_4_6.CraftServer.loadPlugins(CraftServer.jav a:239) at org.bukkit.craftbukkit.v1_4_6.CraftServer.<init>(CraftServer.java:217 ) at net.minecraft.server.v1_4_6.PlayerList.<init>(PlayerList.java:52) at net.minecraft.server.v1_4_6.DedicatedPlayerList.<init>(SourceFile:11) at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.java :104) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java: 399) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:84 9) Caused by: java.lang.IllegalArgumentException: File cannot be null at org.apache.commons.lang.Validate.notNull(Validate.java:203) at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(Yam lConfiguration.java:170) at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:117) at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111) at com.cupcakes69.lottery.Lottery.<init>(Lottery.java:24) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j ava:178) ... 9 more My config.yml Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler entry-price: 50 currency: dollars auto-draw: off draw-amount: 100 No tabs or anything there. The things loading the config Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: String price = getConfig().getString("entry-price"); String currency = getConfig().getString("currency"); String autoDrawS = getConfig().getString("auto-draw"); String autoDrawAmountS = getConfig().getString("draw-amount"); I deal with the integers with a valueOf.. further in my code there's Code: int autoDrawAmount = Integer.valueOf(autoDrawAmountS); I check if the config would return an int with a Integer.parseInt(i) but I don't think that's the problem. Does anyone know what is? Tell me if you need any more information. Thank you, Cupcakes.
evilmidget38 http://pastebin.com/fye1tbwn Took me a while to create all this The SLAPI is just a simple manager to save and load hashmaps so it'll store its values when the server isn't online.
Move your variable assignments from the declaration to onEnable(). EDIT: Your config variable assignments. You can't use getConfig() before onEnable() has been called.
Thank you very much, I moved the assignments to the inside of the methods it is used in, allowing it to enable the plugin without calling them yet