You have to subclass each type. Settings library is major PITA. Begs for a rewrite.
General developer forum
Be also careful with that check and make sure it does not prevent module from being installed. During module installation Moodle will detect and offer settings for a user to set of a new module. If there are no defaults and user does not enter anything Moodle will not stop showing them until some resonable value is entered by the user. This also screws CLI installations/upgrades.
Thanks for the insight. It looks like I'd be better off making a custom settings page and having an 'enable' checkbox that controls the settings that I want to make required.
I think a more feasible option is to just have your plugin display a polite error message if it is not set up properly.
Think about this scenario: an admin installs your plugin into their Moodle, but does not currently know where the other server will be. They have to be able to click 'Save changes' on the 'Update settings' page to complete the install, so the only viable option is for them to leave that setting blank for now, and fill it in later.