return input.getSimpleName().toLowerCase().contains(pluginName);
}
}));
if (matchingClasses.isEmpty()) {
BearParserScriptSupplier.ui.warn(new TextConsoleEventToUI("shell", "no plugins found for '<i>" + pluginName + "</i>'\n"));
throw new RuntimeException("no plugins found for '" + pluginName + "'");
}
if (matchingClasses.size() > 1) {
BearParserScriptSupplier.ui.warn(new TextConsoleEventToUI("shell", "1+ plugins found for '<i>" + pluginName + "</i>': " + matchingClasses + "\n"));
throw new RuntimeException("1+ plugins found for '" + pluginName + "': " + pluginName);
}
return global.plugin(matchingClasses.get(0));
}