Change custom post type slug from plugin options

The best way to do it is right before you display the options page. Right before your call to settings_fields, add this:

if( isset( $_REQUEST['settings-updated'] ) )
    flush_rewrite_rules();

Remove the flush_rewrite_rules from your other function and that should do the trick. Its worked for me.