Skip to content

Provide a pseudo-realtime list of active players on a Minecraft Server

Notifications You must be signed in to change notification settings

izcet/mc_list_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Active Player Monitor

These scripts provide a pseudo-realtime list of active players on a Minecraft Server.
Warning: Probably buggy, I tested on static log files and a server that had ~4 active players.

Passive Watcher

This script does all of the main work. It scrapes the log output of the minecraft server to gain information about players joining or leaving. I opted to scrape the log files because it allows monitoring of a system, but doesn't interfere with it running.

  • It stores the active player list in a file in the current directory, by default named mcap_list.txt.
  • It requires at least 1 new line of log output to display correctly, until then it will say (no active players).
  • You can run it with sh passive_watcher.sh and it will provide basic output.
  • To fire-and-forget and have it run in the background, use sh passive_watcher.sh &> /dev/null & or use screen

Active Watcher

An example script to provide realtime output. This just uses the watch command and reads the file created by the Passive Watcher. You could also just reference the output file from your own backend/frontend/relay service.

About

Provide a pseudo-realtime list of active players on a Minecraft Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages