Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 08:30:12 +01: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"
Dieser Commit ist enthalten in:
Ursprung
44174fdc04
Commit
119fbc86bc
@ -115,6 +115,11 @@ public class LoggingPacketHandler implements BedrockPacketHandler {
|
|||||||
return defaultHandler(packet);
|
return defaultHandler(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PacketSignal handle(CraftingEventPacket packet) {
|
||||||
|
return defaultHandler(packet);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PacketSignal handle(EntityEventPacket packet) {
|
public PacketSignal handle(EntityEventPacket packet) {
|
||||||
return defaultHandler(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));
|
geyser.getLogger().info(GeyserLocale.getLocaleStringLog("geyser.network.remote.disconnect", authData.name(), remoteServer.address(), disconnectMessage));
|
||||||
}
|
}
|
||||||
if (cause != null) {
|
if (cause != null) {
|
||||||
GeyserImpl.getInstance().getLogger().error(cause.getMessage());
|
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
|
// 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
|
// This only needs to be "initiated" here when there is an exception, hence the cause clause
|
||||||
GeyserSession.this.disconnect(disconnectMessage);
|
GeyserSession.this.disconnect(disconnectMessage);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren