public static void Initialise()
 {
     #if Full_API
     if (Terraria.Main.dedServ)
     {
         var ctx = new HookContext()
         {
             Sender = HookContext.ConsoleSender
         };
         var args = new HookArgs.ServerStateChange()
         {
             ServerChangeState = ServerState.Initialising
         };
         HookPoints.ServerStateChange.Invoke(ref ctx, ref args);
     }
     #endif
 }
        public static void WorldLoadEnd()
        {
            //Since this is hook is at the end of the world loading then we can clear the new progress loading
            #if Full_API
            Terraria.Main.statusText = String.Empty;
            #endif

            var ctx = new HookContext()
            {
                Sender = HookContext.ConsoleSender
            };
            var args = new HookArgs.ServerStateChange()
            {
                ServerChangeState = ServerState.WorldLoaded
            };
            HookPoints.ServerStateChange.Invoke(ref ctx, ref args);
        }
        public static bool Initialise()
        {
            #if Full_API
            if (Terraria.Main.dedServ)
            {
                var ctx = new HookContext()
                {
                    Sender = HookContext.ConsoleSender
                };
                var args = new HookArgs.ServerStateChange()
                {
                    ServerChangeState = ServerState.Starting
                };
                HookPoints.ServerStateChange.Invoke(ref ctx, ref args);

                return ctx.Result != HookResult.IGNORE;
            }
            #endif

            return true; //Allow continue
        }