Update supported Velocity versions

This commit is contained in:
Nassim Jahnke committed 2026-01-31 12:02:24 +01:00
1 parent a8637d9a06
commit 56259c8318
3 files changed
+6 -24

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ projectVersion=5.7.2-SNAPSHOT
# Smile emoji (note that modrinth may not have added the version on release yet)
mcVersions=1.21.11, 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9
mcVersionRange=1.8-1.21.11
velocityVersion=3.4
velocityVersion=3.4-3.5
# Gradle properties
org.gradle.daemon=true
+1 -1
View File
@@ -19,7 +19,7 @@ checkerQual = "3.52.1"
# Platforms
paper = "1.20.4-R0.1-SNAPSHOT"
legacyBukkit = "1.8.8-R0.1-SNAPSHOT"
velocity = "3.1.1"
velocity = "3.4.0"
viaProxy = "[3.0.0,4.0.0)"
[libraries]
@@ -19,6 +19,7 @@ package com.viaversion.viaversion;
import com.google.gson.JsonObject;
import com.google.inject.Inject;
import com.velocitypowered.api.command.CommandManager;
import com.velocitypowered.api.event.PostOrder;
import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
@@ -80,21 +81,10 @@ public class VelocityPlugin implements ViaServerProxyPlatform<Player> {
@Subscribe
public void onProxyInit(ProxyInitializeEvent e) {
if (!hasConnectionEvent()) {
// No way to disable the plugin :(
Logger logger = this.loggerslf4j;
logger.error(" / \\");
logger.error(" / \\");
logger.error(" / | \\");
logger.error(" / | \\ VELOCITY 3.0.0 IS REQUIRED");
logger.error(" / \\ VIAVERSION WILL NOT WORK AS INTENDED");
logger.error(" / o \\");
logger.error("/_____________\\");
}
PROXY = proxy;
VelocityCommandHandler commandHandler = new VelocityCommandHandler();
PROXY.getCommandManager().register("viaver", commandHandler, "vvvelocity", "viaversion");
CommandManager commandManager = PROXY.getCommandManager();
commandManager.register(commandManager.metaBuilder("viaver").aliases("vvvelocity", "viaversion").plugin(this).build(), commandHandler);
api = new VelocityViaAPI();
logger = new LoggerWrapper(loggerslf4j);
conf = new VelocityViaConfig(configDir.toFile(), logger);
@@ -106,6 +96,7 @@ public class VelocityPlugin implements ViaServerProxyPlatform<Player> {
conf.reload();
}
@SuppressWarnings("deprecation")
@Subscribe(order = PostOrder.LAST)
public void onProxyLateInit(ProxyInitializeEvent e) {
final ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
@@ -240,13 +231,4 @@ public class VelocityPlugin implements ViaServerProxyPlatform<Player> {
public ProtocolDetectorService protocolDetectorService() {
return protocolDetectorService;
}
private boolean hasConnectionEvent() {
try {
Class.forName("com.velocitypowered.proxy.protocol.VelocityConnectionEvent");
return true;
} catch (ClassNotFoundException ignored) {
return false;
}
}
}