Update Velocity #2

Merged
Chaoscaot merged 45 commits from update into master 2025-06-26 23:11:03 +02:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 8c8162dbf6 - Show all commits

View File

@@ -100,6 +100,7 @@ tasks {
runShadow {
workingDir = file("run").also(File::mkdirs)
standardInput = System.`in`
jvmArgs("-Dvelocity.packet-decode-logging=true")
}
named<JavaExec>("run") {
workingDir = file("run").also(File::mkdirs)

View File

@@ -170,7 +170,11 @@ public class ClientConfigSessionHandler implements MinecraftSessionHandler {
@Override
public boolean handle(KnownPacksPacket packet) {
callConfigurationEvent().thenRun(() -> {
player.getConnectionInFlightOrConnectedServer().ensureConnected().write(packet);
VelocityServerConnection targetServer =
player.getConnectionInFlightOrConnectedServer();
if (targetServer != null) {
targetServer.ensureConnected().write(packet);
}
}).exceptionally(ex -> {
logger.error("Error forwarding known packs response to backend:", ex);
return null;