auto delete while download plugin to YumCneter...

This commit is contained in:
j502647092 2015-08-23 23:41:48 +08:00
parent 9208750792
commit 3dd7f16748

View File

@ -116,6 +116,11 @@ public class DownloadManager {
} }
public boolean yum(CommandSender sender, String pluginname) { 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);
} }
} }