mirror of
https://github.com/PaperMC/Velocity.git
synced 2024-11-27 06:30:35 +08:00
Fix cancellation of PlayerChatEvent for key revision GENERIC_V1 (#941)
This commit is contained in:
parent
e08ffa1019
commit
cb1f336d14
@ -104,9 +104,11 @@ public class KeyedChatHandler implements
|
||||
assert playerKey != null;
|
||||
return pme -> {
|
||||
PlayerChatEvent.ChatResult chatResult = pme.getResult();
|
||||
if (!chatResult.isAllowed()
|
||||
&& playerKey.getKeyRevision().compareTo(IdentifiedKey.Revision.LINKED_V2) >= 0) {
|
||||
invalidCancel(logger, player);
|
||||
if (!chatResult.isAllowed()) {
|
||||
if (playerKey.getKeyRevision().compareTo(IdentifiedKey.Revision.LINKED_V2) >= 0) {
|
||||
// Bad, very bad.
|
||||
invalidCancel(logger, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user