Skip to content

Commit

Permalink
Update BukkitVersionChecker.java
Browse files Browse the repository at this point in the history
Don't ignore error messages from update checker
  • Loading branch information
stumper66 committed Nov 13, 2024
1 parent 2611a5a commit 25ce00b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void checkForLatestVersion(){
final UpdateChecker updateChecker = new UpdateChecker("BlackWidow");

try{
updateChecker.getLatestVersion(latestVersion -> {
final boolean result = updateChecker.getLatestVersion(latestVersion -> {
//noinspection deprecation
final String currentVersion = plugin.getDescription().getVersion()
.split(" ")[0];
Expand Down Expand Up @@ -145,6 +145,10 @@ else if (isOutOfDate){
notifyPlayers();
}
});

if (!result){
plugin.getLogger().warning("Error getting latest version: " + updateChecker.getErrorMessage());
}
}
catch (Exception e){
plugin.getLogger().warning("Error getting latest version: " + e.getMessage());
Expand Down

0 comments on commit 25ce00b

Please sign in to comment.