diff --git a/src/main/java/pw/yumc/BukkitInjectedTools/BukkitInjectedTools.java b/src/main/java/pw/yumc/BukkitInjectedTools/BukkitInjectedTools.java index 48d29fd..a0e82ee 100644 --- a/src/main/java/pw/yumc/BukkitInjectedTools/BukkitInjectedTools.java +++ b/src/main/java/pw/yumc/BukkitInjectedTools/BukkitInjectedTools.java @@ -23,6 +23,7 @@ import cn.citycraft.PluginHelper.utils.IOUtil; public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands { private final String prefix = "§6[§bYum §a注入工具§6]§r "; private boolean downloading = false; + private String nfn = "null"; @HandlerCommand(name = "inject") public void inject(final InvokeCommandEvent e) throws IOException { @@ -73,6 +74,7 @@ public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands { e.getSender().sendMessage(prefix + "§c正在主线程下载文件,请勿重复测试...!"); return; } + nfn = "null" + (e.getArgs().length == 1 ? "" : "-" + e.getArgs()[0]); e.getSender().sendMessage(prefix + "§c主线程中断测试!"); PluginKit.scheduleTask(new Runnable() { @Override @@ -80,7 +82,7 @@ public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands { downloading = true; try { final File nFile = new File(getDataFolder(), "null"); - IOUtil.downloadFile("http://pan.yumc.pw/null", nFile); + IOUtil.downloadFile("http://pan.yumc.pw/" + nfn, nFile); nFile.delete(); e.getSender().sendMessage(prefix + "§a主线程中断测试结束!"); } catch (final IOException e) {