forked from sharkbound/MessageAnnouncer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRocketTextCommand.cs
44 lines (38 loc) · 1.12 KB
/
RocketTextCommand.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using Rocket.API.Commands;
using Rocket.Core.DependencyInjection;
using Rocket.Core.User;
namespace fr34kyn01535.MessageAnnouncer
{
[DontAutoRegister]
public class RocketTextCommand : ICommand
{
public string Name { get; }
public string[] Aliases => null;
public string Syntax => "";
public IChildCommand[] ChildCommands => null;
public string Summary { get; }
public string Description => null;
public string Permission { get; }
private readonly List<string> _textLines;
public RocketTextCommand(string name, string summary, string permission, List<string> textLines)
{
Name = name;
Summary = summary;
Permission = permission;
_textLines = textLines;
}
public bool SupportsUser(Type user)
{
return true;
}
public void Execute(ICommandContext context)
{
foreach (string l in _textLines)
{
context.User.SendMessage(l);
}
}
}
}