Skip to content

Commit

Permalink
fix: apply message in PlayerChatEvent when handling `SessionPlayerC…
Browse files Browse the repository at this point in the history
…hatPacket` (PaperMC#1411)

Fix 1.19.3+ unsigned chat not being changed by `PlayerChatEvent`.
  • Loading branch information
skbeh authored and pull[bot] committed Sep 14, 2024
1 parent 7cc9934 commit db21774
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public void handlePlayerChatInternal(SessionPlayerChatPacket packet) {
invalidChange(logger, player);
return null;
}
return this.player.getChatBuilderFactory().builder().message(packet.message)
return this.player.getChatBuilderFactory().builder()
.message(chatResult.getMessage().orElse(packet.getMessage()))
.setTimestamp(packet.timestamp)
.setLastSeenMessages(newLastSeenMessages)
.toServer();
Expand Down

0 comments on commit db21774

Please sign in to comment.