Mech m = new MechFileParser(ms.getSourceFile()).getMech(); m.setOwner(m_client.getLocalPlayer()); m_client.sendAddEntity(m);
Entity e = new MechFileParser(ms.getSourceFile()).getEntity(); e.setOwner(m_client.getLocalPlayer()); m_client.sendAddEntity(e);
    public void actionPerformed(ActionEvent ae) {        if (ae.getSource() == m_bCancel) {            this.setVisible(false);        }        else if (ae.getSource() == m_bPick) {            int x = m_mechList.getSelectedIndex();            if (x == -1) {                return;            }            MechSummary ms = m_mechsCurrent[m_mechList.getSelectedIndex()];            try {                Mech m = new MechFileParser(ms.getSourceFile()).getMech();                m.setOwner(m_client.getLocalPlayer());                m_client.sendAddEntity(m);            } catch (EntityLoadingException ex) {                // some sort of error?                return;            }            this.setVisible(false);        }    }