private void accept(SelectionKey key) throws IOException {
		// For an accept to be pending the channel must be a server socket channel.
		ServerSocketChannel serverSocketChannel = (ServerSocketChannel) key.channel();

		// Accept the connection and make it non-blocking
		SocketChannel socketChannel = serverSocketChannel.accept();

		ConnectionEvent event = new ConnectionEvent(socketChannel);

		Main.getEventSystem().listen(event);
		if(event.isCanceled()){
			try{
				
				//key.cancel();
				socketChannel.close();
				return;
			}catch(Exception e){}
		}
		

		socketChannel.configureBlocking(false);

		// Register the new SocketChannel with our Selector, indicating
		// we'd like to be notified when there's data waiting to be read
		socketChannel.register(this.selector, SelectionKey.OP_READ);
		
		ClientManager.store(new Client(), socketChannel);
	}