Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group = "to.itsme"
version = "4.3.0"
version = "4.2.7"
description = "ItsMyConfig"

ext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ private Result checkMessage(Message message) {
String content = message.getFormattedMessage();
Optional<String> parsed = Strings.parsePrefixedMessage(content);

if (parsed.isPresent()) {
// Also check if message contains ItsMyConfig placeholders even without prefix
boolean hasPlaceholders = content.contains("<p:");

if (parsed.isPresent() || hasPlaceholders) {
try {
// Translate the parsed message (which has the prefix removed)
Component translated = Utilities.translate(parsed.get());
// Use the parsed message if available, otherwise use original content
String messageToProcess = parsed.isPresent() ? parsed.get() : content;
Component translated = Utilities.translate(messageToProcess);

// Use AudienceResolver on both Paper and Spigot
// Note: Gradients will be converted to single colors in console output
Expand Down
5 changes: 4 additions & 1 deletion core/src/main/java/to/itsme/itsmyconfig/util/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,10 @@ public static Optional<String> parsePrefixedMessage(final String message) {
char c = message.charAt(j);
sb.append(c == '§' ? '&' : c);
}
return Optional.of(sb.toString().replace(incognitoPrefix, ""));
String result = sb.toString().replace(incognitoPrefix, "");
// Remove all remaining symbol prefixes to handle cases like "$ERROR | $ERROR"
result = symbolPrefixPattern.matcher(result).replaceAll("");
return Optional.of(result);
} else {
return Optional.empty();
}
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/to/itsme/itsmyconfig/util/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import to.itsme.itsmyconfig.font.Font;
import to.itsme.itsmyconfig.font.FontTag;
import to.itsme.itsmyconfig.placeholder.Placeholder;
import to.itsme.itsmyconfig.placeholder.PlaceholderDependancy;
import to.itsme.itsmyconfig.placeholder.type.ColorPlaceholder;
import to.itsme.itsmyconfig.tag.TagManager;

Expand Down Expand Up @@ -195,10 +194,6 @@ public static TagResolver emptyItsMyConfigTag() {
args.add(argumentQueue.pop().value());
}

if (!data.hasDependency(PlaceholderDependancy.NONE)) {
return Tag.preProcessParsed("");
}

final String parsed = data.asString(args.toArray(new String[0]));
return Tag.preProcessParsed((parsed == null ? "" : parsed).replace("§", "&"));
});
Expand Down