IW4M-Admin/SharedLibraryCore/Interfaces/IScriptCommandFactory.cs

29 lines
1.2 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// defines capabilities of script command factory
/// </summary>
public interface IScriptCommandFactory
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// generate a new script command from parsed source
/// </summary>
/// <param name="name">name of command</param>
/// <param name="alias">alias of command</param>
/// <param name="description">description of command</param>
/// <param name="permission">minimum required permission</param>
/// <param name="isTargetRequired">target required or not</param>
/// <param name="args">command arguments (name, is required)</param>
/// <param name="executeAction">action to peform when commmand is executed</param>
/// <param name="supportedGames"></param>
/// <returns></returns>
2022-01-26 11:32:16 -05:00
IManagerCommand CreateScriptCommand(string name, string alias, string description, string permission,
bool isTargetRequired, IEnumerable<(string, bool)> args, Func<GameEvent, Task> executeAction,
Server.Game[] supportedGames);
}
}