/// <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(); }
/// <summary> /// Initializes the command system provider /// </summary> private void Initialize() { registeredCommands = new Dictionary<string, CommandCallback>(); commandHandler = new ChatCommandHandler(ChatCommandCallback, registeredCommands.ContainsKey); }