This folder contains a small script that reads one or more LuckPerms JSON exports and generates a new JSON file mapping group names to the users in those groups.
On your Minecraft server, run:
/lp export
LuckPerms will create a JSON export file.
- Copy the exported
.jsonfile(s) into the same folder asgroup-map.js - Or keep them in any folder you want (the script can take a folder path)
You need Node.js installed.
From this folder, run:
node group-map.js
Or specify a folder containing your export JSON file(s):
node group-map.js "C:\path\to\your\folder"
The script writes:
group-users-map.json
Format:
{
"groupname": ["User1", "User2"]
}The script can be configured to only include specific groups.
- Open
group-map.js - Edit
ALLOWED_GROUPSto the group names you want (lowercase is recommended)
Example:
const ALLOWED_GROUPS = new Set(['champion', 'soldier', 'gladiator', 'echo', 'warlord', 'titan']);