2020-01-26 19:06:50 -05:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using static SharedLibraryCore.Database.Models.EFClient;
|
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the basic properties of a command
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IManagerCommand
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Executes the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="gameEvent">event corresponding to the command</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task ExecuteAsync(GameEvent gameEvent);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Name of the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Description of the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Description { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Alternative name of the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Alias { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Minimum permission required to execute the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
Permission Permission { get; }
|
2020-01-31 21:15:07 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Syntax for using the command
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Syntax { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates if target is required
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool RequiresTarget { get; }
|
2020-04-26 22:12:49 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates if the commands can be run as another client
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool AllowImpersonation { get; }
|
2020-07-31 21:40:03 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates if the command result should be broadcasted to all clients
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool IsBroadcast { get; set; }
|
2020-01-26 19:06:50 -05:00
|
|
|
|
}
|
|
|
|
|
}
|