+ 照顾一下网络查的,不堵塞下载了

This commit is contained in:
坏黑 2018-09-26 21:41:04 +08:00
parent 0c9d263965
commit 4b32b545d6

View File

@ -70,10 +70,12 @@ public class UpdateTask {
TLocale.Logger.info("COMMANDS.TABOOLIB.UPDATEPLUGIN.FILE-NOT-FOUND");
return;
}
Bukkit.getScheduler().runTaskAsynchronously(TabooLib.instance(), () -> {
FileUtils.download("https://github.com/Bkm016/TabooLib/releases/download/" + newVersion + "/TabooLib-" + newVersion + ".jar", pluginFile);
TLocale.Logger.info("COMMANDS.TABOOLIB.UPDATEPLUGIN.UPDATE-SUCCESS");
if (shutdown) {
Bukkit.shutdown();
}
});
}
}