File tree 1 file changed +6
-1
lines changed
common/src/main/java/xyz/jpenilla/minimotd/common/util
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* This file is part of MiniMOTD, licensed under the MIT License.
3
3
*
4
- * Copyright (c) 2020-2024 Jason Penilla
4
+ * Copyright (c) 2020-2023 Jason Penilla
5
5
*
6
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
* of this software and associated documentation files (the "Software"), to deal
@@ -54,6 +54,11 @@ public final class UpdateChecker {
54
54
result .forEach (element -> versionMap .put (element .getAsJsonObject ().get ("tag_name" ).getAsString (), element .getAsJsonObject ().get ("html_url" ).getAsString ()));
55
55
final List <String > versionList = new LinkedList <>(versionMap .keySet ());
56
56
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
+ }
57
62
if (versionList .get (0 ).equals (currentVersion )) {
58
63
return Collections .emptyList (); // Up to date, do nothing
59
64
}
You can’t perform that action at this time.
0 commit comments