Fix prefix not getting parsed with MineDown

This commit is contained in:
Phoenix616 2021-10-15 14:22:14 +01:00
parent a84cd7a2aa
commit 03317c2c78
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -190,7 +190,11 @@ public class Messages {
public Component getComponent(CommandSender sender, boolean prefixSuffix, Map<String, String> replacementMap, String... replacements) {
MineDown mineDown = new MineDown("%prefix" + getLang(sender));
mineDown.placeholderSuffix("");
mineDown.replace("prefix", prefixSuffix ? prefix.getLang(sender) : "");
if (prefixSuffix) {
mineDown.replace("prefix", MineDown.parse(prefix.getLang(sender)));
} else {
mineDown.replace("prefix", "");
}
mineDown.replace(replacementMap);
mineDown.replace(replacements);
return mineDown.toComponent();