调整:/tlocale 命令重构
调整:bstats 统计跳过配置文件判断
修复:NMSUtil19 工具的部分语法错误导致 1.8 版本启动报错
修复:StirngUtils 工具 similarDegree 方法的蜜汁报错
新增:面子工程
This commit is contained in:
坏黑
2018-06-12 22:11:07 +08:00
parent 8e5279d720
commit 6b58848996
10 changed files with 211 additions and 101 deletions

View File

@@ -11,6 +11,7 @@ import me.skymc.taboolib.commands.internal.type.CommandType;
import me.skymc.taboolib.commands.taboolib.*;
import me.skymc.taboolib.fileutils.FileUtils;
import me.skymc.taboolib.inventory.ItemUtils;
import me.skymc.taboolib.other.NumberUtils;
import me.skymc.taboolib.plugin.PluginUtils;
import me.skymc.taboolib.update.UpdateTask;
import org.bukkit.Bukkit;
@@ -710,7 +711,44 @@ public class TabooLibMainCommand extends BaseMainCommand {
@CommandRegister(priority = 24)
BaseSubCommand getEmptyLine6 = null;
@CommandRegister(priority = 25)
@CommandRegister(priority = 24.1)
BaseSubCommand lagServer = new BaseSubCommand() {
@Override
public String getLabel() {
return "lagServer";
}
@Override
public String getDescription() {
return TLocale.asString("COMMANDS.TABOOLIB.LAGSERVER.DESCRIPTION");
}
@Override
public CommandArgument[] getArguments() {
return new CommandArgument[] {
new CommandArgument(TLocale.asString("COMMANDS.TABOOLIB.LAGSERVER.ARGUMENTS.0"))
};
}
@Override
public void onCommand(CommandSender sender, Command command, String label, String[] args) {
if (NumberUtils.getInteger(args[0]) > 300000) {
TLocale.sendTo(sender, "COMMANDS.TABOOLIB.LAGSERVER.INVALID-TIME");
} else {
TLocale.sendTo(sender, "COMMANDS.TABOOLIB.LAGSERVER.START");
try {
Thread.sleep(NumberUtils.getInteger(args[0]));
} catch (Exception ignored) {
}
TLocale.sendTo(sender, "COMMANDS.TABOOLIB.LAGSERVER.STOP");
}
}
};
@CommandRegister(priority = 26)
BaseSubCommand getEmptyLine7 = null;
@CommandRegister(priority = 27)
BaseSubCommand importData = new BaseSubCommand() {
@Override
@@ -734,7 +772,7 @@ public class TabooLibMainCommand extends BaseMainCommand {
}
};
@CommandRegister(priority = 26)
@CommandRegister(priority = 28)
BaseSubCommand updatePlugin = new BaseSubCommand() {
@Override
@@ -782,10 +820,5 @@ public class TabooLibMainCommand extends BaseMainCommand {
}
}.runTaskAsynchronously(Main.getInst());
}
@Override
public CommandType getType() {
return CommandType.CONSOLE;
}
};
}