mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-12-23 05:08:47 +00:00
auto delete while download plugin to YumCneter...
This commit is contained in:
parent
9208750792
commit
3dd7f16748
@ -116,6 +116,11 @@ public class DownloadManager {
|
||||
}
|
||||
|
||||
public boolean yum(CommandSender sender, String pluginname) {
|
||||
return run(sender, getUrl(pluginname), new File("plugins/YumCenter", pluginname + ".jar"));
|
||||
File yumplugin = new File("plugins/YumCenter", pluginname + ".jar");
|
||||
if (yumplugin.exists()) {
|
||||
sender.sendMessage("§6更新: §e仓库已存在插件 " + pluginname + " 开始更新...");
|
||||
yumplugin.delete();
|
||||
}
|
||||
return run(sender, getUrl(pluginname), yumplugin);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user