Exemple #1
0
 internal static void start(object[] args)
 {
     OakMisc.Log($"^F[^5INFO^F] SharpWood {Oakwood.GetVersion()} ^Asuccessfully ^Fstarted on this server!^R");
     Console.WriteLine($"[INFO] Registered {OakwoodCommandSystem.GetCommandCount()} commands, {OakwoodCommandSystem.GetEventCount()} events");
     if (OnStart != null)
     {
         OnStart();
     }
 }
Exemple #2
0
 internal static void log(DateTime time, string source, string message, bool intoOakConsole = false)
 {
     if (intoOakConsole)
     {
         OakMisc.Log($"[{time.ToString("HH:mm:ss")} - {source}] {message}");
     }
     if (OnLog != null)
     {
         OnLog(time, source, message);
     }
 }
Exemple #3
0
        internal static void OnConsole(object[] args)
        {
            string msg = (string)args[0];

            switch (msg)
            {
            case "shwood":
            {
                OakMisc.Log($"This server is using SharpWood {Oakwood.GetVersion()} made by Sevenisko & NanobotZ.");
            }
            break;

            case "shwood-throwfatal":
            {
                Oakwood.ThrowFatal("User-called");
            }
            break;
            }

            if (OnConsoleText != null)
            {
                OnConsoleText(msg);
            }
        }