Added a config option for the formatting to use if chataboveheads is on

This commit is contained in:
Lucas Nicodemus 2012-05-27 11:03:58 -06:00
parent be2b60d706
commit 6528a9e8f1
2 changed files with 3 additions and 1 deletions

View file

@ -168,6 +168,8 @@ namespace TShockAPI
"Change ingame chat format, {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message"
)] public string ChatFormat = "{1}{2}{3}: {4}";
[Description("Change the chat format when using chat above heads. This begins with a player name wrapped in brackets, as per Terraria's formatting. Same formatting as ChatFormat.")] public string ChatAboveHeadsFormat = "{3}:";
[Description("Force the world time to be normal, day, or night")] public string ForceTime = "normal";
[Description("Disable/Revert a player if they exceed this number of tile kills within 1 second.")] public int

View file

@ -809,7 +809,7 @@ namespace TShockAPI
e.Handled = true;
} else if (!tsplr.mute && TShock.Config.EnableChatAboveHeads)
{
Utils.Broadcast(ply, text, tsplr.Group.R, tsplr.Group.G, tsplr.Group.B);
Utils.Broadcast(ply, String.Format(Config.ChatFormat, tsplr.Group.Name, tsplr.Group.Prefix, tsplr.Name, tsplr.Group.Suffix, text), tsplr.Group.R, tsplr.Group.G, tsplr.Group.B);
e.Handled = true;
}
else if (tsplr.mute)