If a plugin of T2Code was unloaded for example by PlugMan, then an error came in the UpdateChecker, this was fixed
This commit is contained in:
2022-01-27 05:51:09 +01:00
parent 8482f7f787
commit 15f2a5d422
5 changed files with 6 additions and 3 deletions

View File

@@ -152,6 +152,9 @@ public class UpdateAPI {
}
public void getVersion(Consumer<String> consumer, String Prefix, String pluginVersion) {
if (!plugin.isEnabled()){
return;
}
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
try {
InputStream inputStream = (new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId)).openStream();