chore: remove bot limit

This commit is contained in:
2024-10-18 18:23:18 +08:00
parent b0d295d97f
commit 10a61fbee7
1 file changed
+2 -4
@@ -597,6 +597,7 @@ class RCONCommand : BaseCommand() {
} }
} }
@CommandDescription("Java版服务器假人压测")
class MCBotCommand : BaseCommand() { class MCBotCommand : BaseCommand() {
override val commandNames = listOf("/mcbot") override val commandNames = listOf("/mcbot")
@@ -615,10 +616,7 @@ class MCBotCommand : BaseCommand() {
val address = args[1] val address = args[1]
val host = address.split(":").first() val host = address.split(":").first()
val port = address.split(":").last().toInt() val port = address.split(":").last().toInt()
val count = if (args[2].toInt() <= 200) { val count = args[2].toInt()
message.replyAsync("最多只能开启200个客户端!!!")
args[2].toInt()
} else 200
val executor = Executors.newFixedThreadPool(count) val executor = Executors.newFixedThreadPool(count)
val (maxPlayer, onlinePlayer) = this.getPlayerList(host, port) val (maxPlayer, onlinePlayer) = this.getPlayerList(host, port)
val availableSit = maxPlayer - onlinePlayer val availableSit = maxPlayer - onlinePlayer