From 282727c1a138ef4e3c33f43ef10e6957cb469e17 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 5 Jul 2016 16:49:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../java/pw/yumc/BukkitInjectedTools/BukkitInjectedTools.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {