mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-30 05:53:35 +01:00
Fix placeholder value is not parsed for colors
This commit is contained in:
parent
9b7e65992a
commit
4e4b1529ab
@ -434,7 +434,7 @@ public class AdventureUtils {
|
||||
public static Component formatPlaceholder(Component message, MiniMessagePlaceholder... placeholder) {
|
||||
return message.replaceText(builder -> {
|
||||
for (MiniMessagePlaceholder place : placeholder) {
|
||||
builder.matchLiteral(place.getPlaceholder()).replacement(place.getValue());
|
||||
builder.matchLiteral(place.getPlaceholder()).replacement(formatComponent(place.getValue()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ public class Message {
|
||||
* @return the modified Message
|
||||
*/
|
||||
public Message processPlaceholder(String placeholder, Object replacement) {
|
||||
MiniMessagePlaceholder placeholderProcessor = new MiniMessagePlaceholder(placeholder, replacement == null ? "" : replacement.toString());
|
||||
this.message = AdventureUtils.formatPlaceholder(this.message, placeholderProcessor);
|
||||
MiniMessagePlaceholder miniMessagePlaceholder = new MiniMessagePlaceholder(placeholder, replacement == null ? "" : replacement.toString());
|
||||
this.message = AdventureUtils.formatPlaceholder(this.message, miniMessagePlaceholder);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user