mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-14 07:24:50 +01:00
renames
This commit is contained in:
@@ -3,10 +3,10 @@ using System.Text;
|
||||
|
||||
namespace BLHX.Server.Game.Commands;
|
||||
|
||||
[commandHandler("help", "Print out all commands with their description and example", "help")]
|
||||
[CommandHandler("help", "Print out all commands with their description and example", "help")]
|
||||
public class HelpCommand : Command
|
||||
{
|
||||
static readonly Dictionary<Type, commandHandler?> commandAttributes = new Dictionary<Type, commandHandler?>();
|
||||
static readonly Dictionary<Type, CommandHandler?> commandAttributes = new Dictionary<Type, CommandHandler?>();
|
||||
|
||||
public override void Execute(Dictionary<string, string> args)
|
||||
{
|
||||
@@ -15,11 +15,11 @@ public class HelpCommand : Command
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("Available Commands: ");
|
||||
foreach (var command in CommandHandler.Commands)
|
||||
foreach (var command in CommandHandlerFactory.Commands)
|
||||
{
|
||||
if (!commandAttributes.TryGetValue(command.GetType(), out var attr))
|
||||
{
|
||||
attr = command.GetType().GetCustomAttribute(typeof(commandHandler)) as commandHandler;
|
||||
attr = command.GetType().GetCustomAttribute(typeof(CommandHandler)) as CommandHandler;
|
||||
commandAttributes[command.GetType()] = attr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user