@Override
	public void run() {
		
		try {
			
			//While client is sending
			while(this.accepting) {
				
				//Read input stream
				byte[] bytes = readInputStream();
				if (bytes == null)
					break;
				
				//Create command string
				String json = new String(bytes, "UTF8");
				Command command = new Command(json, commands, pluginManager, Log);
				
				try {
					(new CommandThread(command)).start();
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			
			//Finally close the connection
			close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}