diff --git a/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java b/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java index 1402fbb..c5bdb29 100644 --- a/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java +++ b/src/main/java/io/github/_4drian3d/unsignedvelocity/UnSignedVelocity.java @@ -167,8 +167,7 @@ public List getPluginStatusMessages() { } private void checkForUpdates() { - UpdateChecker updateChecker = new UpdateChecker(logger); - updateChecker.checkForUpdates(); + injector.getInstance(UpdateChecker.class).checkForUpdates(); } public boolean isFirstLoad() { diff --git a/src/main/java/io/github/_4drian3d/unsignedvelocity/updatechecker/UpdateChecker.java b/src/main/java/io/github/_4drian3d/unsignedvelocity/updatechecker/UpdateChecker.java index b45af7c..13ff0e7 100644 --- a/src/main/java/io/github/_4drian3d/unsignedvelocity/updatechecker/UpdateChecker.java +++ b/src/main/java/io/github/_4drian3d/unsignedvelocity/updatechecker/UpdateChecker.java @@ -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; @@ -14,6 +15,7 @@ public class UpdateChecker { private final ComponentLogger logger; + @Inject public UpdateChecker(ComponentLogger logger) { this.logger = logger; }