Ejemplo n.º 1
0
 /// <summary>
 /// Initializes the command system provider
 /// </summary>
 private void Initialize()
 {
     rustCommands = typeof(ConsoleSystem.Index).GetField("dictionary", BindingFlags.NonPublic | BindingFlags.Static)?.GetValue(null) as IDictionary<string, ConsoleSystem.Command>;
     registeredChatCommands = new Dictionary<string, CommandCallback>();
     chatCommandHandler = new ChatCommandHandler(ChatCommandCallback, registeredChatCommands.ContainsKey);
     consolePlayer = new RustConsolePlayer();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes the command system provider
 /// </summary>
 private void Initialize()
 {
     registeredCommands = new Dictionary<string, CommandCallback>();
     commandHandler = new ChatCommandHandler(ChatCommandCallback, registeredCommands.ContainsKey);
 }