mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Ignore all downstream packet errors (#693)
* Ignore all downstream packet errors Instead of kicking the client off because of an error, we simply display a logger warning and suppress the error. * If debug mode, print stacktrace
This commit is contained in:
parent
64e3204611
commit
b8a3009c9d
2 changed files with 9 additions and 1 deletions
|
@ -105,7 +105,7 @@
|
|||
<dependency>
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>packetlib</artifactId>
|
||||
<version>1.5-SNAPSHOT</version>
|
||||
<version>1.6-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
|
|
@ -366,6 +366,14 @@ public class GeyserSession implements CommandSender {
|
|||
PacketTranslatorRegistry.JAVA_TRANSLATOR.translate(event.getPacket().getClass(), event.getPacket(), GeyserSession.this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void packetError(PacketErrorEvent event) {
|
||||
connector.getLogger().warning("Downstream packet error! " + event.getCause().getMessage());
|
||||
if (connector.getConfig().isDebugMode())
|
||||
event.getCause().printStackTrace();
|
||||
event.setSuppress(true);
|
||||
}
|
||||
});
|
||||
|
||||
downstream.getSession().connect();
|
||||
|
|
Loading…
Reference in a new issue