docs: protected <X extends IzouPermissionException> void registerOrThrow(AddOnModel addOn, Supplier<X> exceptionSupplier,
                                                                         Function<PluginDescriptor, Boolean> checkPermission) {
          getMain().getAddOnManager().getPluginWrapper(addOn)
                  .map(PluginWrapper::getDescriptor)
                  .map(checkPermission)
                  .ifPresent(allowedToRun -> {
                      if (allowedToRun) {
                          registerAddOn(addOn);
                      } else {
                          throw exceptionSupplier.get();
                      }
                  });
      }