package net.bitjump.bukkit.subwhitelister;

import java.util.logging.Logger;

import net.bitjump.bukkit.subwhitelister.listeners.PlayerListener;
import net.bitjump.bukkit.subwhitelister.util.ConfigManager;

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 void onEnable()
	{
		log = getLogger();
		
		log.info("Plugin initializing...");
		
		pdf = getDescription();

		name = pdf.getName();
		version = pdf.getVersion();
		author = pdf.getAuthors().get(0);
		
		config = ConfigManager.setupConfig();
		
		log.info("Setting up commands...");
		
		log.info("Setting up listeners...");
		getServer().getPluginManager().registerEvents(new PlayerListener(), this);
		
		instance = this;
	}
	
	public void onDisable()
	{
		
	}
}

@@ -71,24 +71,78 @@
 .Logger;%0D%0A%0D%0A
+import net.bitjump.bukkit.subwhitelister.commands.*;%0D%0A
 import net.b
@@ -197,16 +197,16 @@
 tener;%0D%0A
-
 import n
@@ -705,24 +705,62 @@
 author;%0D%0A%09%0D%0A
+%09public static CommandManager cm;%0D%0A%09%0D%0A
 %09public void
@@ -1008,32 +1008,32 @@
 pConfig();%0D%0A%09%09%0D%0A
-
 %09%09log.info(%22Sett
@@ -1051,24 +1051,222 @@
 ands...%22);%0D%0A
+%09%09cm = new CommandManager(this);%0D%0A%09%09cm.setCommandPrefix(%22sw%22);%0D%0A%09%09cm.registerCommand(new ListCommand());%0D%0A%09%09cm.registerCommand(new ReloadCommand());%0D%0A%09%09cm.registerCommand(new ToggleCommand());%0D%0A%09%09%0D%0A
 %09%09%0D%0A%09%09log.in

Update main class.