static void OnNetMessageReceived(ref HookContext ctx, ref HookArgs.ReceiveNetMessage args)
        {
            if (Terraria.Main.ServerSideCharacter)
            {
                switch ((Packet)args.PacketId)
                {
                case Packet.INVENTORY_DATA:
                    if (!AllowGuestInfo && !ctx.Player.IsAuthenticated())
                    {
                        ctx.SetResult(HookResult.IGNORE);
                    }
                    break;

                case Packet.PLAYER_MANA_UPDATE:
                    if (!AllowGuestInfo && !ctx.Player.IsAuthenticated())
                    {
                        ctx.SetResult(HookResult.IGNORE);
                    }
                    break;

                case Packet.PLAYER_HEALTH_UPDATE:
                    if (!AllowGuestInfo && !ctx.Player.IsAuthenticated())
                    {
                        ctx.SetResult(HookResult.IGNORE);
                    }
                    break;
                }
            }
        }
 /// <summary>
 /// Handles packets received from OTA
 /// </summary>
 public static void HandlePacket(ref HookContext ctx, ref HookArgs.ReceiveNetMessage args)
 {
     if (_packetHandlers != null)
     {
         if (_packetHandlers[args.PacketId] != null)
         {
             if (_packetHandlers[args.PacketId].Read(args.BufferId, args.Start, args.Length))
             {
                 //Packet informed us that it was read, let OTA know we consumed the packet
                 ctx.SetResult(HookResult.IGNORE, true);
             }
         }
     }
 }