mirror of
https://github.com/islehorse/HISP.git
synced 2025-07-17 20:41:32 +12:00
Make commands more accurate
This commit is contained in:
parent
997be8573d
commit
55c0f29914
14 changed files with 415 additions and 342 deletions
31
HorseIsleServer/LibHISP/Game/Chat/CommandRegister.cs
Normal file
31
HorseIsleServer/LibHISP/Game/Chat/CommandRegister.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using HISP.Player;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
|
||||
namespace HISP.Game.Chat
|
||||
{
|
||||
public class CommandRegister
|
||||
{
|
||||
private static List<CommandRegister> registeredComamnds = new List<CommandRegister>();
|
||||
public static CommandRegister[] RegisteredCommands
|
||||
{
|
||||
get
|
||||
{
|
||||
return registeredComamnds.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public char CmdLetter;
|
||||
public string CmdName;
|
||||
public Func<string,string[],User, bool> CmdCallback;
|
||||
public CommandRegister(char cmdLetter, string cmdName, Func<string, string[], User, bool> cmdCallback)
|
||||
{
|
||||
CmdLetter = cmdLetter;
|
||||
CmdName = cmdName.ToUpper(CultureInfo.InvariantCulture);
|
||||
CmdCallback = cmdCallback;
|
||||
|
||||
registeredComamnds.Add(this);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue