mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Removed credits for non-installed addons
It causes a lot of unnecessary GitHub API calls which can cause rate-limits.
This commit is contained in:
parent
ad0b01fbc8
commit
cffa294f0e
@ -94,18 +94,12 @@ public class WebManager {
|
||||
}
|
||||
|
||||
List<String> repositories = new ArrayList<>();
|
||||
// Gather all the repositories of installed addons and or catalog entries.
|
||||
// Gather all the repositories of installed addons.
|
||||
repositories.add("BentoBoxWorld/BentoBox");
|
||||
repositories.addAll(plugin.getAddonsManager().getEnabledAddons()
|
||||
.stream().map(addon -> addon.getDescription().getRepository())
|
||||
.filter(repo -> !repo.isEmpty())
|
||||
.collect(Collectors.toList()));
|
||||
repositories.addAll(addonsCatalog.stream().map(CatalogEntry::getRepository)
|
||||
.filter(repo -> !repositories.contains(repo))
|
||||
.collect(Collectors.toList()));
|
||||
repositories.addAll(gamemodesCatalog.stream().map(CatalogEntry::getRepository)
|
||||
.filter(repo -> !repositories.contains(repo))
|
||||
.collect(Collectors.toList()));
|
||||
|
||||
/* Download the contributors */
|
||||
if (plugin.getSettings().isLogGithubDownloadData()) {
|
||||
|
@ -102,11 +102,7 @@ public class CatalogPanel {
|
||||
|
||||
// Send the link to the releases tab on click
|
||||
itemBuilder.clickHandler((panel, user1, clickType, slot) -> {
|
||||
if (clickType.equals(ClickType.MIDDLE)) {
|
||||
CreditsPanel.openPanel(user1, addon.getRepository());
|
||||
} else {
|
||||
user1.sendRawMessage(ChatColor.GRAY + "" + ChatColor.ITALIC + "https://github.com/" + addon.getRepository() + "/releases");
|
||||
}
|
||||
user1.sendRawMessage(ChatColor.GRAY + "" + ChatColor.ITALIC + "https://github.com/" + addon.getRepository() + "/releases");
|
||||
return true;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user