Fix %rank%/%coloredrank% not showing actual rank (#143)

This commit is contained in:
Nathan Curran 2019-08-13 22:55:01 +10:00 committed by Lemon
parent 1951d9adea
commit a166154e48

View File

@ -41,11 +41,11 @@ public class Command_vanish extends FreedomCommand
msg(ChatColor.GOLD + "You have been unvanished."); msg(ChatColor.GOLD + "You have been unvanished.");
if (admin.hasLoginMessage()) if (admin.hasLoginMessage())
{ {
loginMsg = FUtil.colorize(admin.getLoginMessage()); loginMsg = FUtil.colorize(admin.getLoginMessage()).replace("%rank%", plugin.rm.getDisplay(admin).getName()).replace("%coloredrank%", plugin.rm.getDisplay(admin).getColoredName());
} }
if (!silent) if (!silent)
{ {
FUtil.bcastMsg(ChatColor.AQUA + (loginMsg.contains("%name%") ? "" : playerSender.getName() + " is ") + FUtil.colorize(loginMsg).replace("%name%", playerSender.getName())); FUtil.bcastMsg(ChatColor.AQUA + loginMsg);
FUtil.bcastMsg(playerSender.getName() + " joined the game", ChatColor.YELLOW); FUtil.bcastMsg(playerSender.getName() + " joined the game", ChatColor.YELLOW);
} }
if (admin.getTag() != null) if (admin.getTag() != null)