if (entity.getOwner().equals(this.getLocalPlayer())) {
if (entity.getOwner().equals(this.getLocalPlayer()) && entity.getPosition() != null && !entity.isOffBoard()) {
    public ArrayList getEntitiesOwned() {        ArrayList result = new ArrayList();        for (Enumeration i = game.getEntities(); i.hasMoreElements();) {            Entity entity = (Entity) i.nextElement();            if (entity.getOwner().equals(this.getLocalPlayer())) {                result.add(entity);            }        }        return result;    }