本文整理汇总了C#中CommandManager.AddCommand方法的典型用法代码示例。如果您正苦于以下问题:C# CommandManager.AddCommand方法的具体用法?C# CommandManager.AddCommand怎么用?C# CommandManager.AddCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandManager
的用法示例。
在下文中一共展示了CommandManager.AddCommand方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Help
public Help(CommandManager c)
{
this.c = c;
c.AddTab(ParseTab, "help", "h");
c.AddCommand(ParseCommandHelp, "help", "h");
c.AddCommand(ParseCommandChatHelp, "chathelp");
}
示例2: ChatCommands
public ChatCommands(CommandManager c)
{
c.AddCommand(TellAdmin, "telladmin", "admin");
c.AddCommand(Channel, "channel", "ch", "c");
c.AddCommand(Shout, "shout");
c.AddCommand(Prod, "push", "prod", "slap");
c.AddCommand(Firehose, "firehose");
c.AddCommand(Tell, "tell", "msg");
c.AddCommand(Timestamp, "timestamp");
c.AddCommand(Me, null, "me");
c.AddCommand(Chat.ResetChannel, "reset");
}
示例3: RegionCommands
public RegionCommands(CommandManager c)
{
c.AddTab(RegionTab, "region", "reg");
c.AddCommand(RegionCommand, "region", "reg", "faction", "f");
AddTab(TabSet, "set");
AddTab(TabRename, "rename", "ren");
AddTab(TabMessage, "message");
AddTab(TabResize, "resize", "res");
AddCommand(SetRegionStart, "start", "create");
AddCommand(Set, "set");
AddCommand(Rename, "rename", "ren");
AddCommand(Message, "message");
AddCommand(Type, "type");
AddCommand(AddResident, "add");
AddCommand(RemoveResident, "remove", "rem");
AddCommand(Resize, "resize", "res");
AddCommand(Report, "report");
AddCommand(ShowSidebar, "show", "on", "off");
AddAdminCommand(Delete, "delete", "del");
}
示例4: Init
public static void Init(CommandManager c)
{
c.AddCommand(GetTexture, "texturepack");
}
示例5: Players
public Players(CommandManager c)
{
this.c = c;
//CommandManager.AddTab(ParseTab, "help", "h");
c.AddCommand(TheEnd, null, "theend");
c.AddCommand(Position, "position", "pos", "coord", "coords", "cord");
c.AddCommand(Time, null, "time", "timeset", "settime");
c.AddCommand(Load, "load", "lag", "uptime", "l");
c.AddCommand(Die, "kill", "suicide", "killmyself", "kil", "death", "die");
c.AddCommand(Inbox.Read, "read");
c.AddCommand(Stat, "stat");
c.AddCommand(Donate, "donate", "donors", "donor", "doner", "donator", "dontae", "vip");
c.AddCommand(Motd, "motd", "welcome", "info");
c.AddCommand(Rules, "rulebook", "rules", "rule");
c.AddCommand(Version, "version", "ver");
c.AddCommand(Pardon, "pardon", "vote", "vot", "unban", "uban", "umbanned", "unbanned");
c.AddCommand(ToGreenRoom, "greenroom", "wait");
c.AddCommand(ToConstruct, "construct", "con", "cons");
c.AddCommand(ToHell, "hell", "hel");
c.AddCommand(ToRealWorld, "vanilla", "real", "back");
c.AddCommand(ToIsland, "island");
c.AddCommand(ToHardcore, "hardcore");
c.AddCommand(ToWarp, "warp");
c.AddCommand(LockChest, null, "lock", "lwc", "chest", "cprivate", "private", "lcpassword");
}
示例6: Admin
public Admin(CommandManager c)
{
c.AddTab(GameRuleComplete, "gamerule");
c.AddAdminCommand(MassPardon, "masspardon");
c.AddAdminCommand(KillJava, "killjava");
c.AddAdminCommand(NickCommand, "nick");
c.AddAdminCommand(Say, "say");
c.AddAdminCommand(Say2, "say2");
c.AddAdminCommand(Kick, "kick");
c.AddAdminCommand(Ban, "ban");
c.AddAdminCommand(BanIP, "ban-ip", "banip");
c.AddAdminCommand(CleanBannedRegions, "cleanregionsbanned");
c.AddAdminCommand(VanillaCommands, "give");
c.AddAdminCommand(VanillaCommands, "enchant");
c.AddAdminCommand(VanillaCommands, "difficulty");
c.AddAdminCommand(VanillaCommands, "gamerule");
c.AddAdminCommand(VanillaCommands, "spawnpoint");
c.AddAdminCommand(VanillaCommands, "clear");
c.AddAdminCommand(VanillaCommands, "gamemode");
c.AddAdminCommand(VanillaCommands, "effect");
c.AddAdminCommand(VanillaCommands, "scoreboard");
c.AddAdminCommand(VanillaCommands, "weather");
c.AddAdminCommand(VanillaCommands, "toggledownfall");
c.AddAdminCommand(VanillaCommands, "setidletimeout");
c.AddAdminCommand(VanillaCommands, "op", "deop");
c.AddAdminCommand(VanillaCommands, "achievement");
c.AddAdminCommand(VanillaCommands, "blockdata");
c.AddAdminCommand(VanillaCommands, "clone");
c.AddAdminCommand(VanillaCommands, "defaultgamemode");
c.AddAdminCommand(VanillaCommands, "execute");
c.AddAdminCommand(VanillaCommands, "fill");
c.AddAdminCommand(VanillaCommands, "particle");
c.AddAdminCommand(VanillaCommands, "playsound");
c.AddAdminCommand(VanillaCommands, "setblock");
c.AddAdminCommand(VanillaCommands, "summon");
c.AddAdminCommand(VanillaCommands, "title");
c.AddAdminCommand(VanillaLoad, "vanillaload");
c.AddAdminCommand(VanillaUnload, "vanillaunload");
c.AddAdminCommand(VanillaStop, "vanillarestart");
c.AddAdminCommand(AllBack, "allback");
c.AddAdminCommand(OldRestart, null, "restart", "shutdown", "stop");
c.AddAdminCommand(ProxyStop, "proxystop");
c.AddAdminCommand((player, cmd, iarg) =>
{
Threads.DebugThreads();
}, "debugthreads");
c.AddAdminCommand((player, cmd, iarg) =>
{
player.TellSystem(Chat.Pink, "New Usage: /ban 30 username Reason for ban");
}, null, "ban30");
c.AddAdminCommand(VanillaSuspend, "vanillastop");
c.AddAdminCommand(VanillaResume, "vanillastart");
c.AddAdminCommand(Possess, "possess", "poss");
c.AddAdminCommand(Slots, "slots");
c.AddAdminCommand(Flush, "flush");
c.AddAdminCommand(Mode, "mode", "gm", "m");
c.AddAdminCommand(Teleport, "tp", "go");
c.AddAdminCommand(Crash, "crash");
c.AddAdminCommand((player, cmd, offset) =>
{
if (cmd.Length != 4)
throw new UsageException("/ee effectID amplification duration");
var ee = new EntityEffect(player.EntityID, (PlayerEffects)int.Parse(cmd [1]), int.Parse(cmd [2]), int.Parse(cmd [3]));
player.Queue.Queue(ee);
player.TellSystem(Chat.Purple, ee.ToString());
}, "ee");
#if DEBUG
c.AddCommand((player, cmd, offset) =>
{
var steer = new Steer();
steer.Action = Steer.Actions.Unmount;
player.FromClient(steer);
}, "steer");
#endif
}