MB2 Stats is a plugin made for the MB2 Log Reader. The goal of this plugin is to track players across sessions and give plugin makers the power and tools they need to make persistent features.
- JRE that can run Java 11 or higher
- MB2 Log Reader
- MariaDB database
Player commands: triggered by /say
!balance <target>
- Shows the targets credit balance, defaults to the player themselves
This app uses 4 tables to identify players across sessions:
- account
- Most important table for plugin makers
- Stores UUID and balance
- It's possible that clients on the same IP will use the same account
- account_alias
- Stores player aliases and first / last seen
- Necessary for displaying usernames
- account_ip
- Links an IP to a UUID
- First point of identification for a user
- IP can link to multiple UUID, last seen is stored to help resolve account "stealing"
- account_jaguid
- Links a ja_guid to a UUID
- Optional point of identification for a user
- Overrides IP identification
- More reliable
- Only one UUID per ja_guid
If you want to update player names constantly you can enable the ClientUserinfoChanged event in the log reader
parser.disable.clientuserinfochanged=false
java -jar mb2-plugin-stats-VERSION.jar
After your first run a settings file will be generated next to the jar. Fill your credentials there and run again.
To start developing generate your sources by running
./mvn jaxb2:generate
Run this command every time the schema updates
MB2 Stats is licensed under GPLv2 as free software. You are free to use, modify and redistribute MB2 Stats following the terms in LICENSE.txt