Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d09260fbc | ||
|
|
b7b2d0d501 | ||
|
|
c8bfd7431f | ||
|
|
312dcca783 | ||
|
|
e006bca937 | ||
|
|
b5c406e5e1 | ||
|
|
8b9129aeae | ||
|
|
6ef7866893 | ||
|
|
90e7808d65 | ||
|
|
6c6c28f906 |
No files matched your search
@@ -22,4 +22,3 @@
|
||||
|
||||
# Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes')
|
||||
gradlew text eol=lf
|
||||
.gitea/CODEOWNERS linguist-detectable=false
|
||||
@@ -1,3 +0,0 @@
|
||||
# Pull requests request review from the eligible staff team(s).
|
||||
# One approval from either an Admin or Developer satisfies branch protection.
|
||||
* @trueog/Admins @trueog/Developers
|
||||
@@ -76,7 +76,8 @@ public enum ProtocolVersion {
|
||||
MINECRAFT_1_21_7(772, "1.21.7"),
|
||||
MINECRAFT_1_21_9(773, "1.21.9"),
|
||||
MINECRAFT_1_21_11(774, "1.21.11"),
|
||||
MINECRAFT_26_1(775, "26.1");
|
||||
MINECRAFT_26_1(775, "26.1"),
|
||||
MINECRAFT_26_2(776, "26.2");
|
||||
|
||||
private final int protocol;
|
||||
private final String name;
|
||||
|
||||
+6
-3
@@ -75,6 +75,12 @@ allprojects {
|
||||
|
||||
compileJava {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(17)
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
disableAutoTargetJvm()
|
||||
}
|
||||
|
||||
jar {
|
||||
@@ -93,9 +99,6 @@ allprojects {
|
||||
attributes["Git-Commit"] = gitCommit
|
||||
}
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_11
|
||||
java.targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ public enum BukkitServerVersion {
|
||||
MINECRAFT_1_21_9,
|
||||
MINECRAFT_1_21_10,
|
||||
MINECRAFT_1_21_11,
|
||||
MINECRAFT_26_1;
|
||||
MINECRAFT_26_1,
|
||||
MINECRAFT_26_2;
|
||||
|
||||
static final BukkitServerVersion[] REVERSED_VALUES;
|
||||
|
||||
|
||||
@@ -105,7 +105,9 @@ public class SonarPacketPreparer {
|
||||
public final SonarPacket[] REGISTRY_SYNC_1_21_5 = RegistryDataPacket.of(DimensionRegistry.CODEC_1_21_5);
|
||||
public final SonarPacket[] REGISTRY_SYNC_1_21_11 = RegistryDataPacket.of(DimensionRegistry.CODEC_1_21_11);
|
||||
public final SonarPacket[] REGISTRY_SYNC_26_1 = RegistryDataPacket.of(DimensionRegistry.CODEC_26_1);
|
||||
public final SonarPacket[] REGISTRY_SYNC_26_2 = RegistryDataPacket.of(DimensionRegistry.CODEC_26_2);
|
||||
public final SonarPacket TAGS_UPDATE_26_1 = UpdateTagsPacket.of(DimensionRegistry.TAGS_26_1);
|
||||
public final SonarPacket TAGS_UPDATE_26_2 = UpdateTagsPacket.of(DimensionRegistry.TAGS_26_2);
|
||||
public final SonarPacket START_WRITING_CHUNKS = new GameEventPacket(13, 0);
|
||||
public final static SonarPacket INVALID_HELD_ITEM_SLOT = new SetHeldItemPacket(-1);
|
||||
public final SonarPacket RANDOM_KEEP_ALIVE = new SonarPacketSnapshot(new KeepAlivePacket(RANDOM.nextInt()));
|
||||
@@ -152,7 +154,7 @@ public class SonarPacketPreparer {
|
||||
if (username.length() > 16) {
|
||||
username = username.substring(0, 16);
|
||||
}
|
||||
loginSuccess = new SonarPacketSnapshot(new LoginSuccessPacket(uuid, username, true));
|
||||
loginSuccess = new SonarPacketSnapshot(new LoginSuccessPacket(uuid, username, true, UUID.randomUUID()));
|
||||
|
||||
// Prepare JoinGame packet
|
||||
joinGame = new SonarPacketSnapshot(new JoinGamePacket(PLAYER_ENTITY_ID,
|
||||
@@ -162,7 +164,7 @@ public class SonarPacketPreparer {
|
||||
new String[]{"minecraft:overworld"}, "minecraft:overworld", "flat",
|
||||
DimensionType.OVERWORLD, RANDOM.nextLong() & 1337,
|
||||
false, true, false,
|
||||
false, false, false, true));
|
||||
false, false, false, true, false));
|
||||
|
||||
// Prepare the gravity check
|
||||
maxMovementTick = Sonar.get0().getConfig().getVerification().getGravity().getMaxMovementTicks();
|
||||
@@ -294,14 +296,18 @@ public class SonarPacketPreparer {
|
||||
}
|
||||
|
||||
public static @Nullable SonarPacket getTagsPacket(final @NotNull ProtocolVersion protocolVersion) {
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_1)) {
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_2)) {
|
||||
return TAGS_UPDATE_26_2;
|
||||
} else if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_1)) {
|
||||
return TAGS_UPDATE_26_1;
|
||||
}
|
||||
return null; // apparently doesn't crash the client; we're safe... for now.
|
||||
}
|
||||
|
||||
public static SonarPacket[] getRegistryPackets(final @NotNull ProtocolVersion protocolVersion) {
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_1)) {
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_2)) {
|
||||
return REGISTRY_SYNC_26_2;
|
||||
} else if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_1)) {
|
||||
return REGISTRY_SYNC_26_1;
|
||||
} else if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_1_21_11)) {
|
||||
return REGISTRY_SYNC_1_21_11;
|
||||
|
||||
+4
@@ -42,7 +42,9 @@ public final class DimensionRegistry {
|
||||
public final CompoundBinaryTag CODEC_1_21_5;
|
||||
public final CompoundBinaryTag CODEC_1_21_11;
|
||||
public final CompoundBinaryTag CODEC_26_1;
|
||||
public final CompoundBinaryTag CODEC_26_2;
|
||||
public final CompoundBinaryTag TAGS_26_1;
|
||||
public final CompoundBinaryTag TAGS_26_2;
|
||||
|
||||
static {
|
||||
CODEC_1_16 = getCodec("codec_1_16.nbt");
|
||||
@@ -59,7 +61,9 @@ public final class DimensionRegistry {
|
||||
CODEC_1_21_5 = getCodec("codec_1_21_5.nbt");
|
||||
CODEC_1_21_11 = getCodec("codec_1_21_11.nbt");
|
||||
CODEC_26_1 = getCodec("codec_26_1.nbt");
|
||||
CODEC_26_2 = getCodec("codec_26_2.nbt");
|
||||
TAGS_26_1 = getCodec("tags_26_1.nbt");
|
||||
TAGS_26_2 = getCodec("tags_26_2.nbt");
|
||||
}
|
||||
|
||||
private @NotNull CompoundBinaryTag getCodec(final @NotNull String fileName) {
|
||||
|
||||
+5
@@ -38,6 +38,7 @@ public final class LoginSuccessPacket implements SonarPacket {
|
||||
private UUID uuid;
|
||||
private String username;
|
||||
private boolean strictErrorHandling;
|
||||
private UUID sessionId;
|
||||
|
||||
@Override
|
||||
public void encode(final ByteBuf byteBuf, final @NotNull ProtocolVersion protocolVersion) throws Exception {
|
||||
@@ -61,6 +62,10 @@ public final class LoginSuccessPacket implements SonarPacket {
|
||||
// Whether the client should disconnect on its own if it receives invalid data from the server
|
||||
byteBuf.writeBoolean(strictErrorHandling);
|
||||
}
|
||||
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_2)) {
|
||||
ProtocolUtil.writeUUID(byteBuf, sessionId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
@@ -58,6 +58,7 @@ public final class JoinGamePacket implements SonarPacket {
|
||||
private boolean flat;
|
||||
private boolean limitedCrafting;
|
||||
private boolean secureProfile;
|
||||
private boolean onlineMode;
|
||||
|
||||
@Override
|
||||
public void encode(final @NotNull ByteBuf byteBuf, final @NotNull ProtocolVersion protocolVersion) throws Exception {
|
||||
@@ -171,6 +172,10 @@ public final class JoinGamePacket implements SonarPacket {
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_1_20_5)) {
|
||||
byteBuf.writeBoolean(secureProfile);
|
||||
}
|
||||
|
||||
if (protocolVersion.greaterThanOrEquals(ProtocolVersion.MINECRAFT_26_2)) {
|
||||
byteBuf.writeBoolean(onlineMode);
|
||||
}
|
||||
}
|
||||
|
||||
private static CompoundBinaryTag getCodec(final @NotNull ProtocolVersion protocolVersion) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,3 +1,3 @@
|
||||
group=xyz.jonesdev
|
||||
version=2.1.47
|
||||
version=2.1.49
|
||||
description=A lightweight, effective, and easy-to-use anti-bot plugin for Velocity, BungeeCord, and Bukkit.
|
||||
@@ -1,6 +1,6 @@
|
||||
[versions]
|
||||
netty = "4.2.15.Final"
|
||||
adventure = "4.24.0"
|
||||
adventure = "5.2.0"
|
||||
adventure-platform = "4.4.1"
|
||||
bstats = "3.2.1"
|
||||
libby = "2.0.0-SNAPSHOT"
|
||||
@@ -8,8 +8,8 @@ pluginyml = "0.6.0"
|
||||
|
||||
[plugins]
|
||||
indra-git = "net.kyori.indra.git:3.2.0"
|
||||
shadow = "com.gradleup.shadow:9.4.1"
|
||||
spotless = "com.diffplug.spotless:8.6.0"
|
||||
shadow = "com.gradleup.shadow:9.4.3"
|
||||
spotless = "com.diffplug.spotless:8.8.0"
|
||||
pluginyml-bungee = { id = "net.minecrell.plugin-yml.bungee", version.ref = "pluginyml" }
|
||||
pluginyml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version.ref = "pluginyml" }
|
||||
pluginyml-paper = { id = "net.minecrell.plugin-yml.paper", version.ref = "pluginyml" }
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
|
||||
Vendored
+2
-2
@@ -19,7 +19,7 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
@@ -22,6 +22,3 @@ tasks {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
java.targetCompatibility = JavaVersion.VERSION_17
|
||||
Reference in new issue
Block a user