diff --git a/src/helpers/PlayerRank.ts b/src/helpers/PlayerRank.ts index 48953b0c3..1758a4f17 100644 --- a/src/helpers/PlayerRank.ts +++ b/src/helpers/PlayerRank.ts @@ -275,6 +275,9 @@ export function getPlayerRank( customPlusColor as keyof typeof MinecraftColorAsHex ]; } + if (out.priority === PlayerRanks.MVP_PLUS) { + out.prefix = `§b[MVP${customPlusColor ?? "§c"}+§b]`; + } if (out.priority === PlayerRanks.SUPERSTAR) { out.prefix = `${customRankColor ?? "§6"}[MVP${customPlusColor ?? "§c"}++${ customRankColor ?? "§6" diff --git a/tests/helpers.test.ts b/tests/helpers.test.ts index 6161dc42a..d86818749 100644 --- a/tests/helpers.test.ts +++ b/tests/helpers.test.ts @@ -111,6 +111,13 @@ describe("Test PlayerRank helper", function () { ); expect(rank.name).to.be.a("string").that.equals("MVP_PLUS"); }); + it("should return MVP+ with black +", function () { + const rank = getPlayerRank( + { newPackageRank: "MVP_PLUS", rankPlusColor: "BLACK" } as never, + false + ); + expect(rank.prefix).to.be.a("string").that.equals("§b[MVP§0+§b]"); + }); it("should return MVP", function () { const rank = getPlayerRank( { newPackageRank: "MVP", packageRank: "VIP" } as never,