Properly shutdown LocalSession's, ensure transferring works properly regardless if we're injected or not

This commit is contained in:
onebeastchris 2024-04-29 16:08:14 +02:00
parent 4ff746e48a
commit 8b7b8cdffd
4 changed files with 10 additions and 11 deletions

View file

@ -49,9 +49,7 @@ application {
relocate("org.cloudburstmc.netty")
relocate("org.cloudburstmc.protocol")
relocate("com.github.steveice10.mc.protocol")
relocate("com.github.steveice10.mc.auth")
relocate("com.github.steveice10.packetlib")
tasks {
remapJar {

View file

@ -178,7 +178,7 @@ public class GeyserSpigotInjector extends GeyserInjector {
MinecraftProtocol protocol = new MinecraftProtocol();
LocalSession session = new LocalSession(bootstrap.getGeyserConfig().getRemote().address(),
bootstrap.getGeyserConfig().getRemote().port(), this.serverSocketAddress,
InetAddress.getLoopbackAddress().getHostAddress(), protocol, protocol.createHelper(), false);
InetAddress.getLoopbackAddress().getHostAddress(), protocol, protocol.createHelper());
session.connect();
session.disconnect("");
}