mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 00:47:39 +01:00
Assume enforce secure chat as false by default
Setting it to true will result in chat validation errors on the client for other players without chat sessions or valid signatures
This commit is contained in:
parent
9654a613cd
commit
d2ca6a82be
@ -210,9 +210,15 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
||||
handler(playerTrackerHandler());
|
||||
handler(wrapper -> {
|
||||
// Enforces secure chat - moved from server data (which is unfortunately sent a while after this)
|
||||
// Just put in what we know if this is sent multiple times
|
||||
final AcknowledgedMessagesStorage storage = wrapper.user().get(AcknowledgedMessagesStorage.class);
|
||||
wrapper.write(Type.BOOLEAN, storage.isSecureChatEnforced());
|
||||
if (storage.secureChatEnforced() != null) {
|
||||
// Just put in what we know if this is sent multiple times
|
||||
wrapper.write(Type.BOOLEAN, storage.isSecureChatEnforced());
|
||||
} else {
|
||||
// Assume that it isn't, otherwise the client will disregard chat messages from players
|
||||
// without chat sessions if it assumes secure chat is enforced
|
||||
wrapper.write(Type.BOOLEAN, false);
|
||||
}
|
||||
|
||||
storage.clear();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user