@Subscribe
	public void logout(PlayerDisconnectEvent event) throws SQLException {
		if(!plugin.chatEnabled)return;
		String name = event.getPlayer().getName();
		if(name==null){
			for(String data:plugin.onlinePlayers.keySet()){
				if(plugin.getProxy().getPlayer(data)==null){
					plugin.onlinePlayers.remove(data);
					return;
				}
			}
		}
		plugin.getUtilities().updateLastSeen(name);
		if (plugin.onlinePlayers.containsKey(name)) {
			ChatPlayer cp = plugin.getChatPlayer(name);
			if (cp == null){
				return;
			}
			// remove from all channels
			for (String data : cp.getChannels()) {
				ChatChannel cc = plugin.getChannel(data);
				cc.offlineMember(cp);
			}
			plugin.getChannel(cp.getCurrentServer()).removeMember(cp.getName());
			if (plugin.chatSpying.contains(cp.getName())) {
				plugin.chatSpying.remove(cp.getName());
			}
			plugin.onlinePlayers.remove(event.getPlayer().getName());
		}
	}