private void ExecuteCommand(Command command) { if (command.IsValid()) command.Execute(); }
public void RegisterCommand(Command command) { World.RegisterCommand(RealmToken, command); }
public void RegisterCommand(RealmToken source, Command command) { command.Source = source; if (_interactiveModeRealms.Contains(source)) { DebugConsole.WriteLine("Interactive command : " + command); new Thread(()=>_datalock.ImmediateWrite(() => ExecuteCommand(command))).Start(); DebugConsole.WriteLine("Interactive command done : " + command); return; } DebugConsole.WriteLine("Defered command : "+command); _commands.Enqueue(command); }