TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ Reply()

void Terraria.ModLoader.ConsoleCommandCaller.Reply ( string text,
Color color = default(Color) )
inline

Use this to respond to the Player that invoked this command. This method handles writing to the console, writing to chat, or sending messages over the network for you depending on the CommandType used. Avoid using Main.NewText, Console.WriteLine, or NetMessage.SendChatMessageToClient directly because the logic would change depending on CommandType.

Parameters
text
color

Implements Terraria.ModLoader.CommandCaller.

Definition at line 12 of file ConsoleCommandCaller.cs.

13 {
14 string[] array = text.Split('\n');
15 for (int i = 0; i < array.Length; i++)
16 {
17 Console.WriteLine(array[i]);
18 }
19 }
@ Console
Command can be used in server console during MP.

References Terraria.ModLoader.Console.