public void OnRoundStart(Server server) { startEvent.InterpreteConfig(); plugin.Info("Generating a random number..."); /*plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString()); * plugin.Info(rnd.Next(0, startEvent.events.Count).ToString());*/ rounds_passed++; plugin.Info("Number of rounds passed ... " + rounds_passed); bool automatic = plugin.GetConfigBool("auto_events"); if (automatic) { if (rounds_passed == plugin.GetConfigInt("auto_events_interval") + 1) { rounds_passed = 0; int randomNR = rnd.Next(0, startEvent.events.Count); plugin.Info("Choosing " + (randomNR + 1) + " event out of " + startEvent.events.Count); startEvent.OnCall(plugin.pluginManager.CommandManager, new string[] { startEvent.events[randomNR].name }); } } }