IW4M-Admin/SharedLibraryCore/Interfaces/IManagerCommand.cs

64 lines
1.7 KiB
C#
Raw Normal View History

using System.Threading.Tasks;
using static Data.Models.Client.EFClient;
using static SharedLibraryCore.Server;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// Defines the basic properties of a command
/// </summary>
public interface IManagerCommand
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// Name of the command
/// </summary>
string Name { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Description of the command
/// </summary>
string Description { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Alternative name of the command
/// </summary>
string Alias { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Minimum permission required to execute the command
/// </summary>
Permission Permission { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Games the command is supported on
/// </summary>
Game[] SupportedGames { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Syntax for using the command
/// </summary>
string Syntax { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Indicates if target is required
/// </summary>
bool RequiresTarget { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Indicates if the commands can be run as another client
/// </summary>
bool AllowImpersonation { get; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Indicates if the command result should be broadcasted to all clients
/// </summary>
bool IsBroadcast { get; set; }
2022-01-26 11:32:16 -05:00
/// <summary>
/// Executes the command
/// </summary>
/// <param name="gameEvent">event corresponding to the command</param>
/// <returns></returns>
Task ExecuteAsync(GameEvent gameEvent);
}
2022-01-26 11:32:16 -05:00
}