Skip to content

Add silent message moderation#2

Open
petrikvs wants to merge 4 commits intoPixelMindMC:masterfrom
petrikvs:claude/silent-message-moderation-gHQgC
Open

Add silent message moderation#2
petrikvs wants to merge 4 commits intoPixelMindMC:masterfrom
petrikvs:claude/silent-message-moderation-gHQgC

Conversation

@petrikvs
Copy link
Copy Markdown

No description provided.

claude added 4 commits March 23, 2026 18:17
Adds a new "SILENT" option for the chatguard message-handling config.
When enabled, toxic messages detected by AI are cancelled but sent back
only to their author, creating the illusion of successful delivery while
hiding the message from all other players. The strike system and server
logging still apply. Supports both standard Bukkit chat and CarbonChat
integration. Locale strings added for all 8 languages.

https://claude.ai/code/session_01VxBVHr1ibPXu49CsDL2yd8
Triggers on version tags (v*). Builds shadowJar and publishes
the JAR as a GitHub Release with auto-generated release notes.

https://claude.ai/code/session_01VxBVHr1ibPXu49CsDL2yd8
@petrikvs petrikvs marked this pull request as draft March 23, 2026 18:37
@Gaming12846 Gaming12846 added the enhancement New feature or request label Mar 24, 2026
@petrikvs petrikvs marked this pull request as ready for review March 24, 2026 15:39
@Gaming12846 Gaming12846 removed their request for review March 30, 2026 21:29
@Gaming12846 Gaming12846 assigned ToothyDev and unassigned Gaming12846 Mar 30, 2026
Copy link
Copy Markdown
Member

@ToothyDev ToothyDev left a comment

Choose a reason for hiding this comment

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

Looks fine otherwise, tested and works. Just change what I said in the comments and resolve the merge conflicts, then we can merge this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is nice but we don't really need this at the current stage in the project, doing it manually is trivial as of now


switch (messageHandling) {
case "BLOCK" -> event.cancelled(true);
case "SILENT" -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think SILENCE fits better here because it's the verb form like the other actions


switch (messageHandling) {
case "BLOCK" -> event.setCancelled(true);
case "SILENT" -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SILENT -> SILENCE here as well

* @param player The player that sent the message
* @param userMessage The message that the user sent
* @param classification The classification of the message
* @param messageHandling The message handling mode: "BLOCK", "CENSOR", or "SILENT"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SILENT -> SILENCE here as well

plugin.getConfigHelperLanguage()
.getString(blockOrCensor ? LangConstants.ChatGuard.MESSAGE_BLOCKED : LangConstants.ChatGuard.MESSAGE_CENSORED) +
" " + ChatColor.RED + classification.reason());
if (plugin.getConfigHelper().getBoolean(ConfigConstants.ChatGuard.NOTIFY_USER) && !messageHandling.equals("SILENT")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SILENT -> SILENCE here as well

.info("Message by " + player.getName() + (blockOrCensor ? " has been blocked: " : " has been censored: ") + userMessage);
String action = switch (messageHandling) {
case "BLOCK" -> "blocked";
case "SILENT" -> "silently moderated";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SILENT -> SILENCE here as well

Comment on lines +153 to +154
# Options: CENSOR, BLOCK, SILENT
# SILENT: The message is only visible to the sender, creating the illusion of successful delivery
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SILENT -> SILENCE here as well

@ToothyDev
Copy link
Copy Markdown
Member

Also, please add this PR to the current changelog file

@ToothyDev ToothyDev added this to the 1.3.0 milestone Mar 31, 2026
@ToothyDev ToothyDev changed the title Claude/silent message moderation g h qg c Add silent message moderation Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants