Skip to content

Commit 5e95c87

Browse files
authored
Fix nickname format codes bleeding into following text (#6564)
The single-arg legacyToMini() facet default flipped from false to true during the Paper adventure migration (#6220), switching message placeholder serialization from strict to non-strict. Non-strict output leaves format tags open, so a formatted nickname/display name bleeds its color and formatting into the rest of the message. Restore the default to false and drop the now-redundant <reset> workaround in SocialSpy local chat (#6507). Fixes #6559 Fixes #6537
1 parent c28c654 commit 5e95c87

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Essentials/src/main/java/com/earth2me/essentials/adventure/SpigotAdventureFacet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public ComponentHolder deserializeMiniMessage(String message) {
7676

7777
@Override
7878
public String legacyToMini(String message) {
79-
return legacyToMini(message, true);
79+
return legacyToMini(message, false);
8080
}
8181

8282
@Override

EssentialsChat/src/main/java/com/earth2me/essentials/chat/processing/AbstractChatHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ protected void handleChatRecipients(AbstractChatEvent event) {
225225
if (!spyEvent.isCancelled()) {
226226
final String legacyString = ess.getAdventureFacet().miniToLegacy(
227227
String.format(spyEvent.getFormat(),
228-
ess.getAdventureFacet().legacyToMini(user.getDisplayName()) + "<reset>",
228+
ess.getAdventureFacet().legacyToMini(user.getDisplayName()),
229229
ess.getAdventureFacet().legacyToMiniWithUrls(ess.getAdventureFacet().escapeTags(spyEvent.getMessage()))));
230230

231231
for (final Player onlinePlayer : spyEvent.getRecipients()) {

providers/PaperProvider/src/main/java/com/earth2me/essentials/adventure/PaperAdventureFacet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void send(Player player, ComponentHolder component) {
7676

7777
@Override
7878
public String legacyToMini(String message) {
79-
return legacyToMini(message, true);
79+
return legacyToMini(message, false);
8080
}
8181

8282
@Override

0 commit comments

Comments
 (0)