Skip to content

Refactor MinecraftHandler for improved player handling - #34

Open
Anudhyan wants to merge 1 commit into
Erdragh:version/1.20.1from
Anudhyan:patch-1
Open

Anudhyan wants to merge 1 commit into
Erdragh:version/1.20.1from
Anudhyan:patch-1

Conversation

@Anudhyan

@Anudhyan Anudhyan commented Nov 1, 2026

Copy link
Copy Markdown

Refactor MinecraftHandler to include ClientInformation in ServerPlayer instantiation and improve webhook client handling.

Summary

Fixes #31

Minecraft messages sent through AstralBot webhooks could contain @everyone or @here. Discord interprets these as mass mentions, which could notify every member or every online member in the server.

This change sanitizes those mentions before sending webhook messages:

  • @everyone becomes @.everyone
  • @here becomes @.here

Normal Discord messages remain unchanged, and messages sent without webhooks keep their existing behavior.

Testing

  • Verified the webhook content is sanitized before being sent.
  • Verified regular messages without @everyone or @here are unchanged.
  • Ran the project test/build command successfully.

Refactor MinecraftHandler to include ClientInformation in ServerPlayer instantiation and improve webhook client handling.
Copilot AI balanced review requested due to automatic review settings November 1, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants