File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
common/src/main/java/xyz/jpenilla/minimotd/common/util Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ public final class UpdateChecker {
5454 result .forEach (element -> versionMap .put (element .getAsJsonObject ().get ("tag_name" ).getAsString (), element .getAsJsonObject ().get ("html_url" ).getAsString ()));
5555 final List <String > versionList = new LinkedList <>(versionMap .keySet ());
5656 final String currentVersion = "v" + Constants .PluginMetadata .VERSION ;
57+ if (versionList .isEmpty ()) { // Sometimes version check will fail and get an empty list
58+ return Collections .singletonList (
59+ "Failed to check version, if this plugin work incorrectly, please check for updates manually at https://github.com/jpenilla/MiniMOTD/releases"
60+ );
61+ }
5762 if (versionList .get (0 ).equals (currentVersion )) {
5863 return Collections .emptyList (); // Up to date, do nothing
5964 }
You can’t perform that action at this time.
0 commit comments