Skip to content

Commit

Permalink
Made onEnable respect muted version notifications (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
OakLoaf authored May 16, 2024
1 parent ae6f0f4 commit 24ef775
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/de/oliver/fancyholograms/FancyHolograms.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ public void onEnable() {

registerListeners();

checkForNewerVersion();
versionConfig.load();
if (!getHologramConfiguration().areVersionNotificationsMuted()) {
checkForNewerVersion();
}

registerMetrics();

Expand Down Expand Up @@ -233,8 +236,6 @@ private void registerListeners() {
}

private void checkForNewerVersion() {
versionConfig.load();

final var current = new ComparableVersion(versionConfig.getVersion());

supplyAsync(getVersionFetcher()::fetchNewestVersion).thenApply(Objects::requireNonNull).whenComplete((newest, error) -> {
Expand Down

0 comments on commit 24ef775

Please sign in to comment.