public void onEnable() {
		persist = new Persistence(this);
		persist.saveDefault();
		saveDefaultConfig();

		// whew all the handlers and managers...mostly
		name = getConfig().getString("name");
		longname = getConfig().getString("longname");
		pHandler = new PlayerListener(this);
		chat = new ChatManager(this);
		command = new CommandManager(this);
		PlayerManager.init();
		ChannelManager.init();
		PluginUtil.plugin = this;
		permissions = PermissionsEx.getPermissionManager();
		
		getLogger().setUseParentHandlers(false);
		try {
			fileHandler = new FileHandler(getDataFolder() + "/chat3.log", 1024 * 1024 * 1024, 1);
			fileHandler.setFormatter(new LogFormatter());
			getLogger().addHandler(fileHandler);
		} catch (SecurityException | IOException e) {
			System.out.println("Error opening log file, redirecting output to console.");
			getLogger().setUseParentHandlers(true);
		}
		
		//mutelist
			
		this.mutelist = MutelistManager.load(this);
		
		//timeouts
		TimeoutsManager.load(this);
		
		// persistence
		loadPlayers();
		loadChannels();
		
		// set up colored ranks and stuff
		Player[] players = getServer().getOnlinePlayers();
		for(int i = 0; i < players.length; i++) {			
			String result = PluginUtil.color(PluginUtil.formatUser(players[i].getName()));
			if(result.length() > 16)
				result = result.substring(0, 16);
			players[i].setPlayerListName(result);
		}

		// start connecting to server
		final MCNSAChat3 finalThis = this;
		getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
			public void run() {
				if (thread == null) {
					thread = new ClientThread(finalThis, finalThis.getLogger());
					thread.start();
				}
			}
		}, 0L, 200L);
		
		//Timeouts
		Bukkit.getScheduler().scheduleSyncRepeatingTask(finalThis, new Runnable() {  
			
			public void run() {
				TimeoutManager timeoutTask = new TimeoutManager(finalThis, getLogger());
				timeoutTask.start();
			}
			
			}, 0L, 600L);
		
		//Tab list refreshing
		Bukkit.getScheduler().scheduleSyncRepeatingTask(finalThis, new Runnable() {  
			
			public void run() {
				PlayerRefresh.refreshTabList();
			}
			
			}, 0L, 600L);
	}