public void lockPortal(final int ID){
  int index=unlockedPortals.size() - 1;
  if (unlockedPortals.contains(ID)) {
    while (index >= 0) {
      if (unlockedPortals.get(index) == ID) {
        unlockedPortals.remove(index);
        logger.debug("Removed portal ID " + Integer.toString(ID) + " from player "+ getName()+ ".");
      }
      index-=1;
    }
  }
}

public void lockPortal ( final int ID ) { int index = unlockedPortals . size ( ) - 1 ; if ( unlockedPortals . contains ( ID ) ) { while ( index >= 0 ) { if ( unlockedPortals . get ( index ) == ID ) { unlockedPortals . remove ( index ) ; logger . debug ( "Removed portal ID " + Integer . toString ( ID ) + " from player " + getName ( ) + "." ) ; } index -= 1 ; } } }
removes the portal from the list of unlocked portals .
