code: private static AlertThreshold getAlertThreshold(Plugin plugin) {
          if (!plugin.isEnabled()) {
              return AlertThreshold.OFF;
          }
          return plugin.getAlertThreshold(true);
      }
docs: Gets the appropriate {@code AlertThreshold} for the state of the given plugin.
  <p>
  If the plugin is disabled it returns {@link AlertThreshold#OFF}, otherwise it returns its {@code AlertThreshold}.
  
  @param plugin the plugin for which a {@code AlertThreshold} will be returned.
  @return the appropriate {@code AlertThreshold} for the plugin's state.