Minecraft Server Player List
Quick script that generates a list of recent players on your server, sorted
in order of who last logged in. Works by looking at the last modified time of
their player.dat files in <server root>/world/playerdata, and resolving
those UUIDs to a playername using Mojang's API.
Caching
Optionally, you can write out the usernames to a cache file (to prevent API rate
limiting) using the --cache-file option. Usernames will only be looked up
again after 120s.
Usage
$ mc_players -h
usage: mc_players [-h] [--out OUT] [--cache-file CACHE_FILE] [--cache-expiry CACHE_EXPIRY] [--html] [-n N] [--servername SERVERNAME] worldpath
Generate a list of recent players on a minecraft server.
positional arguments:
worldpath Path to the world folder to scan (eg <server_root>/world)
options:
-h, --help show this help message and exit
--out OUT Path to output file, defaults to stdout
--cache-file CACHE_FILE
Path to cache file (created if not exists) to prevent rate limiting
--cache-expiry CACHE_EXPIRY
Look up usernames that haven't been looked up in n seconds
--html
-n N Only return the last n usernames, default all
--servername SERVERNAME
Server name for use in output
Example Output
Plain Text
$ python3 playerlist.py /opt/mc/world
Players last seen on server
=================================================
1 Bob Mon Oct 05 2020, 11:01 PM
2 Dan Mon Oct 05 2020, 10:28 PM
3 George Mon Oct 05 2020, 03:06 PM
HTML
$ python3 playerlist.py --html /opt/mc/world
<html>
<head>
<!-- generated with github.com/jaydenmilne/minecraft-server-player-list -->
<title>server players</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
</head>
<body>
<h1>Players on server</h1>
<table>
<tr><th>Place</th><th>Player</th><th>Last Seen</th></tr>
<tr><td>1<td>Bob</td><td>Tue Oct 06 2020, 07:33 PM</td></tr>
<tr><td>2<td>Dan</td><td>Tue Oct 06 2020, 07:06 PM</td></tr>
<tr><td>3<td>George</td><td>Tue Oct 06 2020, 06:39 PM</td></tr>
</table>
</body>
</html>
Metadata
Release files for mc-players 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mc_players-2.1.1.tar.gz | 17.1 kB | Without provenance | Details for mc_players-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mc_players-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for mc_players-2.1.1-py3-none-any.whl |
Total release size: 34.5 kB
Release files / mc_players-2.1.1.tar.gz
| Download URL | mc_players-2.1.1.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7dba43d8b322fa003a6d2e8403d525d718d78b6a3df3798b9e6502670aaf0be
|
|
BLAKE2b-256 checksum How to use checksums |
c4b0726cb10610004f80db42ba15c72142f7429b50cbd1e08aac15edd976039a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.2 Windows/10
|
Release files / mc_players-2.1.1-py3-none-any.whl
| Download URL | mc_players-2.1.1-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5294927c41d695480e967a2bdceece7f9df4fe62f3c1089f420cf5ff102d7cc0
|
|
BLAKE2b-256 checksum How to use checksums |
4ffb029a717449213065895cb086101208fa1e66c2df23efa470e63ecd9cfca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.2 Windows/10
|
Security for mc-players 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.