Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Don't forward chat acknowledgement if the client didn't acknowledge any chat
Dieser Commit ist enthalten in:
Ursprung
c6bb15c69b
Commit
4eae510fb7
@ -52,10 +52,6 @@ public class LastSeenMessages {
|
|||||||
buf.writeBytes(Arrays.copyOf(acknowledged.toByteArray(), DIV_FLOOR));
|
buf.writeBytes(Arrays.copyOf(acknowledged.toByteArray(), DIV_FLOOR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return acknowledged.isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return this.offset;
|
return this.offset;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,11 @@ public class SessionCommandHandler implements CommandHandler<SessionPlayerComman
|
|||||||
}
|
}
|
||||||
// An unsigned command with a 'last seen' update will not happen as of 1.20.5+, but for earlier versions - we still
|
// An unsigned command with a 'last seen' update will not happen as of 1.20.5+, but for earlier versions - we still
|
||||||
// need to pass through the acknowledgement
|
// need to pass through the acknowledgement
|
||||||
return new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset());
|
final int offset = packet.lastSeenMessages.getOffset();
|
||||||
|
if (offset != 0) {
|
||||||
|
return new ChatAcknowledgementPacket(offset);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren