GeorgH93 / MarriageMaster

Marriage Plugin for Bukkit/Spigot
https://www.spigotmc.org/resources/marriage-master.19273/
GNU General Public License v3.0
113 stars 90 forks source link

Fixed double hearts for placeholder MagicHeart #236

Closed Qveshn closed 2 years ago

Qveshn commented 2 years ago

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()

  1. 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.

PS: Also removed redundant cast (MarriageData)

GeorgH93 commented 2 years ago

Thanks