コード例 #1
0
 public void Initialize()
 {
     Client.AddCommand(new Client.InformationalCommand((e) => string.Join(", ", Utils.GetActivePlayers().Select(p => string.Concat(new object[]
     {
         Utils.PreventTagsInterpretation(p.name),
         " [",
         p.whoAmI,
         "]",
         p.hostile ? " (PvP)" : ""
     }))), new string[]
     {
         "online",
         "playing",
         "who"
     }, "Displays players online"));
     Client.AddCommand(new Client.InformationalCommand((e) => string.Join("\n", Client.Commands.Select(c => c.Help == "N/A" ? string.Join(" ", c.Names) : string.Concat(new object[]
     {
         string.Join(" ", c.Names),
         " - ",
         c.Help
     }))), "commands", "Displays registered commands"));
     Client.AddCommand(new Client.ActionCommand(GetItem, new string[] { "item", "i" })
     {
         format = "^(?<name>(?:\\d+)?\\D+)(?<stack>\\d+)?(?:\\s(?<prefix>.+))?$"
     });
     ApplyTestInjection();
 }