Skip to content

Commit

Permalink
Fix missing dependencies message
Browse files Browse the repository at this point in the history
  • Loading branch information
srnyx committed Dec 25, 2022
1 parent 95d9bf5 commit a5d66bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/main/java/xyz/srnyx/annoyingapi/AnnoyingPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ private void enablePlugin() {
.filter(dependency -> dependency.required && dependency.isNotInstalled())
.collect(Collectors.toSet());
if (!missing.isEmpty()) {
log(Level.SEVERE, "&cDisabling " + getName() + "because it's missing required dependencies: &4" + missing);
final Set<String> missingNames = missing.stream()
.map(dependency -> dependency.name)
.collect(Collectors.toSet());
log(Level.SEVERE, "&cDisabling " + getName() + " because it's missing required dependencies: &4" + missingNames);
if (!getName().equals("AnnoyingAPI")) disablePlugin();
return;
}
Expand Down

0 comments on commit a5d66bf

Please sign in to comment.