As it was before:
getMagicHeart() already returns color+heart+reset
And valueMarried also returns the heart (according to default config.yml->Placeholders.MagicHeart.Married: "<heart>&f")
Therefore command papi parse player %marriagemaster_MagicHeart% returns two hearts. The first one with color and the seceond with "reset" (white) color.
There were two ways to fix bug:
1, change to return player.getMarriageData().getMagicHeart()
change to return player.getMarriageData().getColor() + valueMarried;
But the first way makes the parameter config.yml->Placeholders.MagicHeart.Married useless.
Therefore, I chose the second way to fix bug. This makes it possible to continue using the parameter from config.
As it was before:
getMagicHeart()
already returns color+heart+reset AndvalueMarried
also returns the heart (according to defaultconfig.yml->Placeholders.MagicHeart.Married: "<heart>&f"
) Therefore commandpapi parse player %marriagemaster_MagicHeart%
returns two hearts. The first one with color and the seceond with "reset" (white) color.There were two ways to fix bug: 1, change to
return player.getMarriageData().getMagicHeart()
return player.getMarriageData().getColor() + valueMarried;
But the first way makes the parameter
config.yml->Placeholders.MagicHeart.Married
useless. Therefore, I chose the second way to fix bug. This makes it possible to continue using the parameter from config.PS: Also removed redundant cast
(MarriageData)