mirror of
https://e.coding.net/circlecloud/BukkitInjectedTools.git
synced 2024-12-27 07:28:48 +00:00
feat: 修改中断测试文件地址
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
3447d2457b
commit
1cb1d87b90
@ -1,8 +1,14 @@
|
||||
package pw.yumc.BukkitInjectedTools;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import pw.yumc.BukkitInjectedTools.event.YumTestEvent;
|
||||
import pw.yumc.YumCore.bukkit.Log;
|
||||
import pw.yumc.YumCore.bukkit.P;
|
||||
@ -13,11 +19,6 @@ import pw.yumc.YumCore.commands.annotation.Sort;
|
||||
import pw.yumc.YumCore.commands.interfaces.Executor;
|
||||
import pw.yumc.YumCore.kit.PKit;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
|
||||
/**
|
||||
* Yum测试命令
|
||||
*
|
||||
@ -118,18 +119,18 @@ public class YumTestCommand implements Executor {
|
||||
return;
|
||||
}
|
||||
nfn = "null" + (size != null ? "-" + size : "");
|
||||
Log.sender(sender, "§c主线程中断测试!");
|
||||
Log.sender(sender, "§c主线程中断测试开始!");
|
||||
PKit.scheduleTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
downloading = true;
|
||||
try {
|
||||
final File nFile = new File(getDataFolder(), "null");
|
||||
Files.copy(new URL("http://pan.yumc.pw/" + nfn).openStream(), nFile.toPath());
|
||||
Files.copy(new URL("https://coding.net/u/502647092/p/YumData/git/raw/master/dd/" + nfn).openStream(), nFile.toPath());
|
||||
nFile.delete();
|
||||
Log.sender(sender, "§a主线程中断测试结束!");
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
Log.sender(sender, "§a主线程中断测试失败 错误: " + e.getMessage());
|
||||
}
|
||||
downloading = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user