Added a config option for the formatting to use if chataboveheads is on
This commit is contained in:
parent
be2b60d706
commit
6528a9e8f1
2 changed files with 3 additions and 1 deletions
|
|
@ -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"
|
"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}";
|
)] 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("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
|
[Description("Disable/Revert a player if they exceed this number of tile kills within 1 second.")] public int
|
||||||
|
|
|
||||||
|
|
@ -809,7 +809,7 @@ namespace TShockAPI
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
} else if (!tsplr.mute && TShock.Config.EnableChatAboveHeads)
|
} 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;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
else if (tsplr.mute)
|
else if (tsplr.mute)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue