Skip to content

Honor the configured Discord private-message format - #6644

Merged
JRoy merged 3 commits into
EssentialsX:2.xfrom
voidsipp:fix/6641-private-chat-format
Nov 3, 2026
Merged

JRoy merged 3 commits into
EssentialsX:2.xfrom
voidsipp:fix/6641-private-chat-format

Conversation

@voidsipp

@voidsipp voidsipp commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Information

This PR fixes #6641.

Details

Proposed fix:

Read the private-message format from messages.pms-to-discord, matching the shipped config. The settings loader currently reads messages.private-chat instead, so a custom format is ignored and the default [SocialSpy] text is used.

Added settings tests that load real YAML files and check the custom format, default fallback and reload, including placeholders and apostrophes. The Discord module now includes the core project on its test classpath.

Environments tested:

OS: Windows
Java version: Temurin 25.0.4.1+1

  • Most recent Paper version
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

The full Gradle build passes, including the new settings tests and Checkstyle. Live Paper/Discord relay testing was not performed.

Demonstration:

The regression loads this configuration:

messages:
  pms-to-discord: "[Privado] {sender-displayname} -> {receiver-displayname}: {message}"

Before the fix, the actual settings loader produces [SocialSpy] sender -> receiver: Hello. After the fix, it produces [Privado] Sender -> Receiver: Hello. The missing-key control keeps the existing default.

@mdcfe
mdcfe requested a review from JRoy November 3, 2026 12:08
@JRoy

JRoy commented Nov 3, 2026

Copy link
Copy Markdown
Member

Thanks!

@JRoy JRoy added bug: confirmed Confirmed bugs in EssentialsX. module: discord Issues or PRs for the EssentialsDiscord module type: bugfix PRs that fix bugs in EssentialsX. and removed bug: confirmed Confirmed bugs in EssentialsX. labels Nov 3, 2026
@JRoy
JRoy enabled auto-merge November 3, 2026 16:18
@JRoy
JRoy added this pull request to the merge queue Nov 3, 2026
Merged via the queue into EssentialsX:2.x with commit f8724e2 Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: discord Issues or PRs for the EssentialsDiscord module type: bugfix PRs that fix bugs in EssentialsX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

private-chat essentials x discord doesnt update format

2 participants