Skip to content

Commit

Permalink
misc: Get an instance of the UpdateChecker class using the Guice inje…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
MemencioPerez committed Jan 2, 2025
1 parent 15508fd commit 2c87628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public List<Component> getPluginStatusMessages() {
}

private void checkForUpdates() {
UpdateChecker updateChecker = new UpdateChecker(logger);
updateChecker.checkForUpdates();
injector.getInstance(UpdateChecker.class).checkForUpdates();
}

public boolean isFirstLoad() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.inject.Inject;
import io.github._4drian3d.unsignedvelocity.utils.Constants;
import net.kyori.adventure.text.logger.slf4j.ComponentLogger;

Expand All @@ -14,6 +15,7 @@
public class UpdateChecker {
private final ComponentLogger logger;

@Inject
public UpdateChecker(ComponentLogger logger) {
this.logger = logger;
}
Expand Down

0 comments on commit 2c87628

Please sign in to comment.