newSprites.removeElement(sprite);
newSprites.remove(sprite);
    public void redrawEntity(Entity entity) {        Integer entityId = new Integer(entity.getId());        EntitySprite sprite = (EntitySprite) entitySpriteIds.get(entityId);        Vector newSprites = new Vector(entitySprites);        Hashtable newSpriteIds = new Hashtable(entitySpriteIds);        if (sprite != null) {            newSprites.removeElement(sprite);        }        Coords position = entity.getPosition();        if (position != null) {            sprite = new EntitySprite(entity);            newSprites.addElement(sprite);            newSpriteIds.put(entityId, sprite);        }        entitySprites = newSprites;        entitySpriteIds = newSpriteIds;        for (java.util.Enumeration i = C3Sprites.elements(); i.hasMoreElements();) {            final C3Sprite c3sprite = (C3Sprite) i.nextElement();            if (c3sprite.entityId == entity.getId())                C3Sprites.removeElement(c3sprite);            else if (c3sprite.masterId == entity.getId()) {                // Only redraw client-to-master; otherwise                // we leave stray lines when we move.                if (entity.hasC3()) {                    C3Sprites.addElement(new C3Sprite(game.getEntity(c3sprite.entityId), game.getEntity(c3sprite.masterId)));                }                C3Sprites.removeElement(c3sprite);            }        }        if (entity.hasC3() || entity.hasC3i()) addC3Link(entity);        repaint(100);    }