Skip to content

Commit 2a67707

Browse files
committed
2 parents 3d18f80 + 5dd1e94 commit 2a67707

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
1-
# Source2Framework.CommandService
1+
# Source2Framework.CommandService
2+
3+
```csharp
4+
/// <summary>
5+
/// This service exposes the internal <see cref="CommandManager"/>.
6+
/// </summary>
7+
public interface ICommandService : ISharedService
8+
{
9+
/// <summary>
10+
/// Executes a command in the given player context. (Only registered commands can be executed)
11+
/// </summary>
12+
/// <param name="player">Target player</param>
13+
/// <param name="command">Command</param>
14+
public void ExecuteRegisteredCommand(CCSPlayerController player, string command);
15+
16+
/// <summary>
17+
/// Whether the given command is registered or not.
18+
/// </summary>
19+
/// <param name="command">Command</param>
20+
/// <returns><see langword="true"/> if registered, <see langword="false"/> otherwise.</returns>
21+
public bool IsCommandRegistered(string command);
22+
23+
/// <summary>
24+
/// Get the <see cref="CommandDefinition"/> instance for the given command.
25+
/// </summary>
26+
/// <param name="command">Command</param>
27+
/// <returns><see cref="CommandDefinition"/> instance for the given command if exists, otherwise <see langword="null"/></returns>
28+
public CommandDefinition? GetCommandDefinition(string command);
29+
30+
/// <summary>
31+
/// Gets every <see cref="CommandDefinition"/> instance for the given command.
32+
/// </summary>
33+
/// <param name="command">Command</param>
34+
/// <returns>A <see cref="IList{CommandDefinition}"/> of <see cref="CommandDefinition"/>s for the given command if exists, otherwise <see langword="null"/></returns>
35+
public IList<CommandDefinition>? GetCommandDefinitions(string command);
36+
}
37+
```

0 commit comments

Comments
 (0)