Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01: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
Dieser Commit ist enthalten in:
Ursprung
64e3204611
Commit
b8a3009c9d
@ -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();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren