Last Played Logger
Mod Overview
Last Played Logger is a server-side utility that automatically records player login dates to a Google Sheets spreadsheet. The mod is designed to simplify whitelist management and monitor participant activity on your server.
Configuration Setup
The configuration file is located in the "serverconfig" folder within the world directory and is named "last_played_logger-server.toml". Main parameters:
- active — enable or disable the mod's functionality
- spreadsheetID — Google Sheets spreadsheet identifier
- tab_name — name of the spreadsheet tab
Google Sheets API Preparation
To get started, you need to activate the Google Sheets API on the official Google developers website. Create a "last_played_logger" folder next to the "config" folder and place the credentials.json file with authorization data inside it.
Creating the Spreadsheet
You can use a ready-made spreadsheet template by copying it through the "File" → "Make a copy" menu. The example spreadsheet contains two tabs:
The "Online Log" tab automatically populates with records of each player connection. For existing players, only the last login date is updated.
The "Statistics" tab contains two lists: players sorted by name, and players sorted by last login date.
Access Configuration
The spreadsheet must be accessible for editing via link. In the sharing settings, select "Get Link" and set "Editor" permissions for anyone with the link.
Initial Setup
During the first server launch on your local computer, an authorization link will appear in the logs:
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=419570840170-ajsv0mce1gpvb2affbgn9avf85ualmkq.apps.googleusercontent.com&redirect_uri=http://localhost:62199/Callback&response_type=code&scope=https://www.googleapis.com/auth/spreadsheets
Attempting to open that address in the default browser now...
After following the link, select the Google account that owns the spreadsheet and grant the necessary permissions.
After successful authorization, the mod will begin automatically adding player connection records to your spreadsheet.