Skip to content

Commit

Permalink
Fix CCE in chat handling
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Aug 3, 2023
1 parent 0002c94 commit ed03da3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -989,10 +989,10 @@ private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMes
}

@Inject(method = "tryHandleChat", cancellable = true, at = @At(value = "INVOKE", shift = At.Shift.AFTER, target = "Lnet/minecraft/server/network/ServerGamePacketListenerImpl;unpackAndApplyLastSeen(Lnet/minecraft/network/chat/LastSeenMessages$Update;)Ljava/util/Optional;"))
private void arclight$deadMenTellNoTales(String p_242372_, Instant p_242311_, LastSeenMessages.Update p_242217_, CallbackInfoReturnable<Boolean> cir) {
private void arclight$deadMenTellNoTales(String p_242372_, Instant p_242311_, LastSeenMessages.Update p_242217_, CallbackInfoReturnable<Optional<LastSeenMessages>> cir) {
if (this.player.isRemoved()) {
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
cir.setReturnValue(false);
cir.setReturnValue(Optional.empty());
}
}

Expand Down

0 comments on commit ed03da3

Please sign in to comment.