5 Commits
Author SHA1 Message Date
Lncvrt 939ed09bdb Merge pull request 'Update to Minecraft 1.21.11' (#117) from eripum9/main into main
Reviewed-on: http://git.lncvrt.xyz/Lncvrt/mc-bots/pulls/117
2026-03-28 18:20:17 +00:00
eripum9 8417fd7b45 chore: bump version to 1.2.18 2026-02-11 20:02:47 +01:00
eripum9 60e624e47e feat: update dependencies for Minecraft 1.21.11 and Java 21 support 2026-02-11 19:58:00 +01:00
crpmax e8e3b4f9c0 fix: downgrade dnsjava, feat: update readme 2025-08-06 14:35:49 +02:00
정현우니andCreeperMax 7c1eb7cf24 Update for Minecraft 1.21.7 (#111)
* chore: update Gradle wrapper to version 9.0.0

* chore: update Java toolchain to version 17

* chore: update dependencies to latest versions

* fix: add missing parameter to chat packet constructor

---------

Co-authored-by: CreeperMax <38163280+crpmax@users.noreply.github.com>
2025-08-06 14:11:38 +02:00
4 changed files with 29 additions and 24 deletions

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
# Minecraft bot stress tester # Minecraft bot stress tester
🤖 A simple open source app written in Java used for stress testing Minecraft servers with bots (fake players). 🤖 A simple open source app written in Java used for stress testing Minecraft servers with bots (fake players).
💥 It can be also used to test plugins or minigames. 💥 It can be also used to test plugins or minigames.
✔️ The MC version of the bots is 1.21.6 ✔️ The MC version of the bots is 1.21.7 (supports server 1.21.8)
For older MC versions please look in the [releases](https://github.com/crpmax/mc-bots/releases " releases"). For older MC versions please look in the [releases](https://github.com/crpmax/mc-bots/releases " releases").
## 🆒 Features ## 🆒 Features
@@ -21,7 +21,7 @@ Use of pre-compiled jar from [releases](https://github.com/crpmax/mc-bots/releas
When running, you can write a chat message to the terminal to send it by all bots. When running, you can write a chat message to the terminal to send it by all bots.
## 🧪 Example ## 🧪 Example
`java -jar mc-bots-1.2.16.jar -s 192.168.0.189:25565 -p BOT_ -d 4000 5000 -c 30 -r` `java -jar mc-bots-1.2.17.jar -s 192.168.0.189:25565 -p BOT_ -d 4000 5000 -c 30 -r`
This will connect 30 bots to server at 192.168.0.189:25565 with delay 4000-5000 ms and will use real-looking nicknames prefixed with BOT_ This will connect 30 bots to server at 192.168.0.189:25565 with delay 4000-5000 ms and will use real-looking nicknames prefixed with BOT_
<img src="https://imgur.com/XWcckas.png" title="Connected bots" width="350px"/> <img src="https://imgur.com/XWcckas.png" title="Connected bots" width="350px"/>
+14 -11
View File
@@ -3,10 +3,7 @@ plugins {
} }
group 'me.creepermaxcz.mc-bots' group 'me.creepermaxcz.mc-bots'
version '1.2.16' version '1.2.18'
sourceCompatibility = 1.17
targetCompatibility = 1.17
repositories { repositories {
mavenCentral() mavenCentral()
@@ -16,13 +13,19 @@ repositories {
} }
dependencies { dependencies {
implementation 'org.geysermc.mcprotocollib:protocol:1.21.6-SNAPSHOT' implementation 'org.geysermc.mcprotocollib:protocol:1.21.11-SNAPSHOT'
implementation 'net.kyori:adventure-text-serializer-gson:4.16.0' implementation 'net.kyori:adventure-text-serializer-gson:4.24.0'
implementation 'commons-cli:commons-cli:1.5.0' implementation 'commons-cli:commons-cli:1.9.0'
implementation 'com.diogonunes:JColor:5.2.0' implementation 'com.diogonunes:JColor:5.5.1'
implementation 'dnsjava:dnsjava:3.4.3' implementation 'dnsjava:dnsjava:3.5.3'
implementation 'org.slf4j:slf4j-nop:2.0.13' implementation 'org.slf4j:slf4j-nop:2.0.17'
implementation 'org.jline:jline:3.22.0' implementation 'org.jline:jline:3.30.4'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
} }
jar { jar {
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
+12 -10
View File
@@ -2,8 +2,10 @@ package me.creepermaxcz.mcbots;
import net.lenni0451.commons.httpclient.HttpClient; import net.lenni0451.commons.httpclient.HttpClient;
import net.raphimc.minecraftauth.MinecraftAuth; import net.raphimc.minecraftauth.MinecraftAuth;
import net.raphimc.minecraftauth.step.java.session.StepFullJavaSession; import net.raphimc.minecraftauth.java.JavaAuthManager;
import net.raphimc.minecraftauth.step.msa.StepMsaDeviceCode; import net.raphimc.minecraftauth.java.model.MinecraftProfile;
import net.raphimc.minecraftauth.msa.model.MsaDeviceCode;
import net.raphimc.minecraftauth.msa.service.impl.DeviceCodeMsaAuthService;
import org.geysermc.mcprotocollib.auth.GameProfile; import org.geysermc.mcprotocollib.auth.GameProfile;
import org.geysermc.mcprotocollib.network.ProxyInfo; import org.geysermc.mcprotocollib.network.ProxyInfo;
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
@@ -23,6 +25,7 @@ import java.io.*;
import java.net.*; import java.net.*;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.*; import java.util.*;
import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -277,18 +280,17 @@ public class Main {
botCount = 1; botCount = 1;
HttpClient httpClient = MinecraftAuth.createHttpClient(); HttpClient httpClient = MinecraftAuth.createHttpClient();
StepFullJavaSession.FullJavaSession javaSession = JavaAuthManager authManager = JavaAuthManager.create(httpClient)
MinecraftAuth.JAVA_DEVICE_CODE_LOGIN.getFromInput( .login(DeviceCodeMsaAuthService::new, (Consumer<MsaDeviceCode>) msaDeviceCode -> {
httpClient, new StepMsaDeviceCode.MsaDeviceCodeCallback(
msaDeviceCode -> {
Log.info("Authorize your Microsoft account on " + msaDeviceCode.getDirectVerificationUri()); Log.info("Authorize your Microsoft account on " + msaDeviceCode.getDirectVerificationUri());
Log.info("Waiting for authorization."); Log.info("Waiting for authorization.");
})); });
Log.info("Logged in with username: " + javaSession.getMcProfile().getName()); MinecraftProfile mcProfile = authManager.getMinecraftProfile().getUpToDate();
Log.info("Logged in with username: " + mcProfile.getName());
GameProfile gameProfile = new GameProfile(javaSession.getMcProfile().getId(), javaSession.getMcProfile().getName()); GameProfile gameProfile = new GameProfile(mcProfile.getId(), mcProfile.getName());
protocol = new MinecraftProtocol(gameProfile, javaSession.getMcProfile().getMcToken().getAccessToken()); protocol = new MinecraftProtocol(gameProfile, authManager.getMinecraftToken().getUpToDate().getToken());
} else { } else {
protocol = null; protocol = null;
} }