Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Handle invalid disconnect message in 1.8->1.9 (#3834)
Dieser Commit ist enthalten in:
Ursprung
c24169c410
Commit
69b33dc2d2
@ -93,7 +93,14 @@ public class Protocol1_9To1_8 extends AbstractProtocol<ClientboundPackets1_8, Cl
|
||||
return;
|
||||
}
|
||||
|
||||
STRING_TO_JSON.write(wrapper, wrapper.read(Type.STRING));
|
||||
final String reason = wrapper.read(Type.STRING);
|
||||
try {
|
||||
STRING_TO_JSON.write(wrapper, reason);
|
||||
} catch (Exception e) {
|
||||
// Dirty fix for https://github.com/Lenni0451/MCStructs/issues/4, I personally don't think it matters
|
||||
// too much since it's only the login disconnect message and nothing relevant to the gameplay
|
||||
wrapper.write(Type.COMPONENT, ComponentUtil.plainToJson(reason));
|
||||
}
|
||||
});
|
||||
|
||||
// Other Handlers
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren