this.connection.send(this.connection.world); this.connection.flush();
connection.send(connection.world); connection.flush();
    private void processServerCommand(ServerCommand c) {        if (c instanceof CloseConnectionCommand) {            System.out.println("CloseConnectionCommand received");            //Can cause deadlock!            this.connection.disconnect();        } else if (c instanceof LoadWorldCommand) {            System.out.println("LoadWorldCommand received");            this.connection.setState(ConnectionState.INITIALISING);            /*             * TODO in the future, queue up moves from the server whilst             * the client gets a copy of the World, for now just have a             * crude lock             */	    this.connection.send(this.connection.world);	    this.connection.flush();            this.connection.setState(ConnectionState.READY);        } else {            synchronized (this) {                while (this.connection.connectionListener == null) {                    /* if the connectionListener has not yet been added then                     * sleep until one has been added to avoid losing the                     * event */                    try {                        wait();                    } catch (InterruptedException e) {                        assert false;                    }                }                this.connection.connectionListener.processServerCommand(this.connection,                    c);            }        }    }