public static void Initialize() { EventSink.WorldSave += new WorldSaveEventHandler(EventSink_WorldSave); WriteLine("Initializing..."); // Timer Initialization ReleaseTimer = new JailTimer(); ReleaseTimer.Start(); // Load list of previously jailed players JailedPlayers = new Core().Load(); // Bad Word List Initialization BadWords = new List <string>(); try { using (StreamReader reader = new StreamReader(Settings.BadWordsPath)) { while (!reader.EndOfStream) { BadWords.Add(reader.ReadLine()); } } } catch (Exception e) { WriteLine(e, "Error loading bad words from text file."); } WriteLine(String.Format("{0} bad words loaded successfully.", BadWords.Count)); WriteLine("Initializing finished"); }
public static void Initialize() { EventSink.WorldSave += new WorldSaveEventHandler( EventSink_WorldSave ); WriteLine( "Initializing..." ); // Timer Initialization ReleaseTimer = new JailTimer(); ReleaseTimer.Start(); // Load list of previously jailed players JailedPlayers = new Core().Load(); // Bad Word List Initialization BadWords = new List<string>(); try { using ( StreamReader reader = new StreamReader( Settings.BadWordsPath ) ) { while ( !reader.EndOfStream ) { BadWords.Add( reader.ReadLine() ); } } } catch ( Exception e ) { WriteLine( e, "Error loading bad words from text file." ); } WriteLine( String.Format( "{0} bad words loaded successfully.", BadWords.Count ) ); WriteLine( "Initializing finished" ); }