package net.bitjump.bukkit.subwhitelister;

import java.util.logging.Logger;

import net.bitjump.bukkit.subwhitelister.commands.*;
import net.bitjump.bukkit.subwhitelister.listeners.PlayerListener;
import net.bitjump.bukkit.subwhitelister.util.ConfigManager;
import net.bitjump.bukkit.subwhitelister.util.WhitelistManager;

import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;

public class SubWhitelister extends JavaPlugin
{
	public static JavaPlugin instance;
	
	private Logger log;

	public static FileConfiguration config;
	public static PluginDescriptionFile pdf;

	public static String name;
	public static String version;
	public static String author;
	
	public static CommandManager cm;
	
	public void onEnable()
	{
		log = getLogger();
		
		log.info("Plugin initializing...");
		
		pdf = getDescription();

		name = pdf.getName();
		version = pdf.getVersion();
		author = pdf.getAuthors().get(0);
		
		ConfigManager.setup(this);
		config = ConfigManager.setupConfig();
		
		log.info("Setting up commands...");
		cm = new CommandManager(this);
		cm.setCommandPrefix("sw");
		cm.registerCommand(new ListCommand());
		cm.registerCommand(new ReloadCommand());
		cm.registerCommand(new ToggleCommand());
		
		
		log.info("Setting up listeners...");
		getServer().getPluginManager().registerEvents(new PlayerListener(), this);
		
		WhitelistManager.initialize();
		
		instance = this;
	}
	
	public void onDisable()
	{
		
	}
}

@@ -1474,16 +1474,40 @@
 );%0D%0A%09%09%0D%0A
+%09%09instance = this;%0D%0A%09%09%0D%0A
 %09%09Whitel
@@ -1536,32 +1536,8 @@
 );%0D%0A
-%09%09%0D%0A%09%09instance = this;%0D%0A
 %09%7D%0D%0A

Fix another NPE