Discard known packs if we don't have a target
This commit is contained in:
@@ -100,6 +100,7 @@ tasks {
|
|||||||
runShadow {
|
runShadow {
|
||||||
workingDir = file("run").also(File::mkdirs)
|
workingDir = file("run").also(File::mkdirs)
|
||||||
standardInput = System.`in`
|
standardInput = System.`in`
|
||||||
|
jvmArgs("-Dvelocity.packet-decode-logging=true")
|
||||||
}
|
}
|
||||||
named<JavaExec>("run") {
|
named<JavaExec>("run") {
|
||||||
workingDir = file("run").also(File::mkdirs)
|
workingDir = file("run").also(File::mkdirs)
|
||||||
|
@@ -170,7 +170,11 @@ public class ClientConfigSessionHandler implements MinecraftSessionHandler {
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(KnownPacksPacket packet) {
|
public boolean handle(KnownPacksPacket packet) {
|
||||||
callConfigurationEvent().thenRun(() -> {
|
callConfigurationEvent().thenRun(() -> {
|
||||||
player.getConnectionInFlightOrConnectedServer().ensureConnected().write(packet);
|
VelocityServerConnection targetServer =
|
||||||
|
player.getConnectionInFlightOrConnectedServer();
|
||||||
|
if (targetServer != null) {
|
||||||
|
targetServer.ensureConnected().write(packet);
|
||||||
|
}
|
||||||
}).exceptionally(ex -> {
|
}).exceptionally(ex -> {
|
||||||
logger.error("Error forwarding known packs response to backend:", ex);
|
logger.error("Error forwarding known packs response to backend:", ex);
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user