From 2d2c3ad378fc72f4a80a9526d240d90e9e5e04a4 Mon Sep 17 00:00:00 2001 From: AlexDev_ <56083016+alexdev03@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:46:52 +0200 Subject: [PATCH] Added support for 1.21.9 Added more conditions for expressions --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 2 ++ build.gradle | 2 +- gradle.properties | 4 ++-- .../net/william278/velocitab/packet/Protocol770Adapter.java | 3 ++- .../net/william278/velocitab/packet/ScoreboardManager.java | 3 ++- .../william278/velocitab/placeholder/ConditionManager.java | 5 ++++- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72b5172..31915b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,4 +130,6 @@ jobs: 1.21.5 1.21.6 1.21.7 + 1.21.8 + 1.21.9 java: 21 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ee1709..c1f46bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,4 +119,6 @@ jobs: 1.21.5 1.21.6 1.21.7 + 1.21.8 + 1.21.9 java: 21 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2ac4906..4681b44 100644 --- a/build.gradle +++ b/build.gradle @@ -25,10 +25,10 @@ ext { repositories { mavenCentral() + maven { url = 'https://repo.papermc.io/repository/maven-public/' } maven { url = 'https://repo.william278.net/velocity/' } maven { url = 'https://repo.william278.net/releases/' } maven { url = 'https://repo.william278.net/snapshots/' } - maven { url = 'https://repo.papermc.io/repository/maven-public/' } maven { url = 'https://repo.minebench.de/' } maven { url = 'https://jitpack.io' } } diff --git a/gradle.properties b/gradle.properties index 8bf5cb6..9e48885 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,10 @@ javaVersion=21 org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.daemon=true -plugin_version=1.7.8 +plugin_version=1.7.9 plugin_archive=velocitab plugin_description=A beautiful and versatile TAB list plugin for Velocity proxies velocity_api_version=3.4.0 -velocity_minimum_build=521 +velocity_minimum_build=539 papi_proxy_bridge_minimum_version=1.8 diff --git a/src/main/java/net/william278/velocitab/packet/Protocol770Adapter.java b/src/main/java/net/william278/velocitab/packet/Protocol770Adapter.java index 248732b..61bd415 100644 --- a/src/main/java/net/william278/velocitab/packet/Protocol770Adapter.java +++ b/src/main/java/net/william278/velocitab/packet/Protocol770Adapter.java @@ -38,7 +38,8 @@ public class Protocol770Adapter extends Protocol765Adapter { super(plugin, Set.of( ProtocolVersion.MINECRAFT_1_21_5, ProtocolVersion.MINECRAFT_1_21_6, - ProtocolVersion.MINECRAFT_1_21_7 + ProtocolVersion.MINECRAFT_1_21_7, + ProtocolVersion.MINECRAFT_1_21_9 )); } diff --git a/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java b/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java index 2e5b3e9..84f33f9 100644 --- a/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java +++ b/src/main/java/net/william278/velocitab/packet/ScoreboardManager.java @@ -423,7 +423,8 @@ public class ScoreboardManager { .mapping(0x5E, MINECRAFT_1_20_3, false) .mapping(0x60, MINECRAFT_1_20_5, false) .mapping(0x67, MINECRAFT_1_21_2, false) - .mapping(0x66, MINECRAFT_1_21_5, false); + .mapping(0x66, MINECRAFT_1_21_5, false) + .mapping(0x6B, MINECRAFT_1_21_9, false); packetRegistration.register(); } catch (Throwable e) { plugin.log(Level.ERROR, "Failed to register UpdateTeamsPacket", e); diff --git a/src/main/java/net/william278/velocitab/placeholder/ConditionManager.java b/src/main/java/net/william278/velocitab/placeholder/ConditionManager.java index 2fc3c22..e18d4b0 100644 --- a/src/main/java/net/william278/velocitab/placeholder/ConditionManager.java +++ b/src/main/java/net/william278/velocitab/placeholder/ConditionManager.java @@ -110,7 +110,10 @@ public class ConditionManager { @NotNull private String buildExpression(@NotNull String condition) { - return condition.replace("and", "&&").replace("or", "||") + return condition + .replace("GREATER_THAN_OR_EQUAL", ">=").replace("LESS_THAN_OR_EQUAL", "<=") + .replace("GREATER_THAN", ">").replace("LESS_THAN", "<") + .replace("and", "&&").replace("or", "||") .replace("AND", "&&").replace("OR", "||"); }