mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Don't send an awkward "null" when a exeption disconnect cause doesn't have a message (#4306)
* Don't send an awkward "null" when a cause doesn't have a message * Fix accidental regression leading to unhandled "CraftingEventPackets"
This commit is contained in:
parent
44174fdc04
commit
119fbc86bc
2 changed files with 10 additions and 1 deletions
|
@ -115,6 +115,11 @@ public class LoggingPacketHandler implements BedrockPacketHandler {
|
|||
return defaultHandler(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSignal handle(CraftingEventPacket packet) {
|
||||
return defaultHandler(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketSignal handle(EntityEventPacket packet) {
|
||||
return defaultHandler(packet);
|
||||
|
|
|
@ -1039,7 +1039,11 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||
geyser.getLogger().info(GeyserLocale.getLocaleStringLog("geyser.network.remote.disconnect", authData.name(), remoteServer.address(), disconnectMessage));
|
||||
}
|
||||
if (cause != null) {
|
||||
if (cause.getMessage() != null) {
|
||||
GeyserImpl.getInstance().getLogger().error(cause.getMessage());
|
||||
} else {
|
||||
GeyserImpl.getInstance().getLogger().error("An exception occurred: ", cause);
|
||||
}
|
||||
// GeyserSession is disconnected via session.disconnect() called indirectly be the server
|
||||
// This only needs to be "initiated" here when there is an exception, hence the cause clause
|
||||
GeyserSession.this.disconnect(disconnectMessage);
|
||||
|
|
Loading…
Reference in a new issue