Move SendFileToUser to TSP.SendFileTextAsMessage.
This is not a great method, but it's actually the only method in TShock that interpolates the %map% and %players% variables and it used in at least three places in the codebase. Since it's already so specialized, it's not worth changing it to take an actual File object, in my humble opinion. This also clarifies what the method does and what makes it special, as opposed to being fairly generic.
This commit is contained in:
parent
17d151b8f8
commit
3ac52091ea
5 changed files with 41 additions and 41 deletions
|
|
@ -4979,12 +4979,12 @@ namespace TShockAPI
|
|||
|
||||
private static void Motd(CommandArgs args)
|
||||
{
|
||||
TShock.Utils.ShowFileToUser(args.Player, FileTools.MotdPath);
|
||||
args.Player.SendFileTextAsMessage(FileTools.MotdPath);
|
||||
}
|
||||
|
||||
private static void Rules(CommandArgs args)
|
||||
{
|
||||
TShock.Utils.ShowFileToUser(args.Player, FileTools.RulesPath);
|
||||
args.Player.SendFileTextAsMessage(FileTools.RulesPath);
|
||||
}
|
||||
|
||||
private static void Whisper(CommandArgs args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue