diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 0e23c91a2..429ec5a61 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -27,13 +27,10 @@ val configurateVersion: String by project.extra val caffeineVersion: String by project.extra dependencies { - api("com.google.code.gson:gson:$gsonVersion") - api("com.google.guava:guava:$guavaVersion") + api(libs.gson) + api(libs.guava) - // DEPRECATED: Will be removed in Velocity Polymer - api("com.moandjiezana.toml:toml4j:0.7.2") - - api(platform("net.kyori:adventure-bom:${adventureVersion}")) + api(platform(libs.adventure.bom)) api("net.kyori:adventure-api") api("net.kyori:adventure-text-serializer-gson") api("net.kyori:adventure-text-serializer-legacy") @@ -42,16 +39,12 @@ dependencies { api("net.kyori:adventure-text-logger-slf4j") api("net.kyori:adventure-text-serializer-ansi") - api("org.slf4j:slf4j-api:$slf4jVersion") - api("com.google.inject:guice:$guiceVersion") - api("org.checkerframework:checker-qual:${checkerFrameworkVersion}") - api("com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT") - - api("org.spongepowered:configurate-hocon:${configurateVersion}") - api("org.spongepowered:configurate-yaml:${configurateVersion}") - api("org.spongepowered:configurate-gson:${configurateVersion}") - - api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion") + api(libs.slf4j) + api(libs.guice) + api(libs.checker.qual) + api(libs.brigadier) + api(libs.bundles.configurate) + api(libs.caffeine) } tasks { diff --git a/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts b/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts index 1901430f5..e2e621131 100644 --- a/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts +++ b/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts @@ -22,7 +22,7 @@ tasks.withType { "${project.version} (git-$currentShortRevision-b$buildNumber)" } } else { - archiveVersion.get() + "${project.version}" } attributes["Implementation-Version"] = velocityHumanVersion } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8b1f9a817..187f5e39c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -configurate = "3.7.3" +configurate = "4.1.2" flare = "2.0.1" log4j = "2.20.0" netty = "4.1.100.Final" @@ -31,7 +31,7 @@ jline = "org.jline:jline-terminal-jansi:3.23.0" jopt = "net.sf.jopt-simple:jopt-simple:5.0.4" junit = "org.junit.jupiter:junit-jupiter:5.9.0" kyori-ansi = "net.kyori:ansi:1.0.3" -guava = "com.google.guava:guava:25.1-jre" +guava = "com.google.guava:guava:32.1.3-jre" gson = "com.google.code.gson:gson:2.10.1" guice = "com.google.inject:guice:6.0.0" lmbda = "org.lanternpowered:lmbda:2.0.0" diff --git a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java index 728757251..0cb7a50e1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java @@ -107,9 +107,9 @@ public class VelocityRegisteredServer implements RegisteredServer, ForwardingAud throw new IllegalStateException("No Velocity proxy instance available"); } CompletableFuture pingFuture = new CompletableFuture<>(); - server.createBootstrap(loop, serverInfo.getAddress()).handler(new ChannelInitializer() { + server.createBootstrap(loop, serverInfo.getAddress()).handler(new ChannelInitializer<>() { @Override - protected void initChannel(Channel ch) throws Exception { + protected void initChannel(Channel ch) { ch.pipeline().addLast(FRAME_DECODER, new MinecraftVarintFrameDecoder()) .addLast(READ_TIMEOUT, new ReadTimeoutHandler( pingOptions.getTimeout() == 0 diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java index 4a95b00de..e68ad8ced 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java @@ -24,7 +24,6 @@ import com.velocitypowered.api.proxy.player.TabListEntry; import com.velocitypowered.api.util.GameProfile; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; -import com.velocitypowered.proxy.console.VelocityConsole; import com.velocitypowered.proxy.protocol.packet.RemovePlayerInfo; import com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfo; import com.velocitypowered.proxy.protocol.packet.chat.RemoteChatSession; @@ -48,7 +47,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; */ public class VelocityTabList implements InternalTabList { - private static final Logger logger = LogManager.getLogger(VelocityConsole.class); + private static final Logger logger = LogManager.getLogger(VelocityTabList.class); private final ConnectedPlayer player; private final MinecraftConnection connection; private final Map entries;