Minecraft - Online Players Overlay Generator

Overview

Code Quality Code Grade Maintenance GitHub all releases GitHub code size in bytes

Minecraft - Online Players Overlay Generator

Contents

About

MOPOG (pronounced M-OH-PAWG) automatically generates an image displaying the players that are currently on a Minecraft server.

The intended use of the image is as an overlay on a live-stream, and works beautifully with OBS Studio.

Screenshot

online_players2 (Small)

Quick Start

There are two ways to use MOPOG:

  1. Download a pre-built binary (fast, easy, and still configurable!)
  2. Download and run the Python source (a bit more work, but allows deep customization!)

1. Download a Pre-Built Binary


1. Download the latest build

2. Run mowpog.exe

A configuration file called Minecraft_Online_Players_Overlay_Settings.ini will be generated.

3. Configure MOPOG For Your Server

Open Minecraft_Online_Players_Overlay_Settings.ini and change minecraft_server_ip and minecraft_server_port to correspond to your server. See Configuration for more details.

4. Restart MOPOG and Use the Generated Image as You See Fit

By default, an image called online_players.png will be saved to the same directory that the program is run in. The output directory can be changed - see Configuration.

2. Download and Run the Source Code


Python and Git are required for this method. MOPOG was developed using Python 3.9.9.

  1. Clone this repository
git clone https://elsell/MinecraftOnlinePlayersOverlayGenerator && cd MinecraftOnlinePlayersOverlayGenerator
  1. Install Dependencies
python -m pip install –upgrade && python -m pip install -r requirements.txt
  1. Run the Script
python MinecraftOnlinePlayersOverlayGenerator.py

See Command Line Options for more details. A configuration file called Minecraft_Online_Players_Overlay_Settings.ini will be generated.

  1. Configure MOPOG For Your Server Open Minecraft_Online_Players_Overlay_Settings.ini and change minecraft_server_ip and minecraft_server_port to correspond to your server. See Configuration for more details.

Configuration

MOPOG uses a configuration file to give you control over how it runs.

By default, the configuration file is named Minecraft_Online_Players_Overlay_Settings.ini and is generated on the first run of MOPOG.

Below is a copy of the default configuration file, containing a complete list of all configurable parameters.

NOTE: Some parameters are marked as optional and are not required to be in your configuration file.

# Minecraft_Online_Players_Overlay_Settings.ini

[DEFAULT]
# (required) The directory in which the output image will be saved.
image_output_dir = .

# (optional) The filename of the generated image. 
image_name = online_players.png

# (required) The IP address of the Minecraft server you wish to query.
minecraft_server_ip = mc.3411heavenmedia.com

# (optional) The port on which the Minecraft server listens. 
minecraft_server_port = 25565

# (optional) Whether a faint shadow/outline will be drawn behind the player names.
#            Useful when overlaying on a light background.
draw_shadow = True

# (optional) The space between each player head as it's drawn on the image.
vertical_padding = 12

# (optional) How often to refresh the player list. For larger servers (> 25 players),
#            it is recommended that this be >= 30 seconds.
refresh_every_seconds = 10

Command-Line Options

- --help

Show available command-line options.

Example:

$ python MinecraftOnlinePlayersOverlay.py --help

usage: MinecraftOnlinePlayersOverlay.py [-h] [-log LOGLEVEL] [--config CONFIG]

optional arguments:
  -h, --help            show this help message and exit
  -log LOGLEVEL, --loglevel LOGLEVEL
                        Provide logging level. Example --loglevel debug, default=info
  --config CONFIG       Path to config file. Example --config my_custom_config.ini,
                        default=Minecraft_Online_Players_Overlay_Settings.ini

- --config

Default: Minecraft_Online_Players_Overlay_Settings.ini

Pass a pre-existing/custom-named configuration file to MOPOG. If the file does not exist, it will be created with default values.

Example:

python MinecraftOnlinePlayersOverlay.py --config my_config.ini

- --loglevel , -log

Change the verbosity of MOPOG's logging.

Default: info

Valid options can be found on the Python logging library's website.

Example:

python MinecraftOnlinePlayersOverlay.py --loglevel debug

FAQ

I'm getting an error about no players being found!

First, check that the server isn't using a plugin to spoof the number of players. Some servers show that they have players when they do not, but MOPOG sees the truth.

If you are still getting an error, there may be an incompatibility with the version of the server that is being queried. Please Submit an Issue so that we can get to the bottom of it!

Can I make the list lay horizontally?

Unfortunately, MOPOG currently only supports a vertical list. However, if you have Python experience and would like to contribute, feel free to fork this repo and add that feature!

Do I need to enable query in my server.properties?

Nope! MOPOG uses the same status request that the Minecraft client uses, and does not require query to be enabled in server.properties.

Is there any reason that MOPOG might stop working?

Yes! It's important to recognize that MOPOG relies on MC Heads to retrieve images of player skins. Should this service stop working, MOPOG would also stop working.

It would be possible to directly use the Mojang API, but using MC Heads was easier to set up.

If this becomes a problem, MOPOG will have to switch to using the Mojang API directly.

Will I get rate-limited?

Most APIs limit the number of times that a user can request information in a time period, including Mojang.

However, MOPOG uses MC Heads who do not enforce any rate-limit! Therefore you are free to set the refresh interval as low as you feel comfortable.

NOTE: Even though you are theoretically unlimited, very quick refresh rates could potentially slow down the Minecraft server. In addition, the query itself often takes more than 1 second, so it's best to stick to a refresh interval that is no less than 5 seconds.

Projects Used

MOPOG doesn't work alone! Here is a small, non-comprehensive list, of projects that it uses:

You might also like...
Minecraft clone using Python Ursina game engine!
Minecraft clone using Python Ursina game engine!

Minecraft clone using Python Ursina game engine!

Open-source project written in the ursina engine, simulating the popular game Minecraft.
Open-source project written in the ursina engine, simulating the popular game Minecraft.

Voxelcraft is an open-source project written in the ursina engine, simulating the popular game Minecraft.

Creates a landscape with more accurate river generation in Minecraft version 1.12 using python.
Creates a landscape with more accurate river generation in Minecraft version 1.12 using python.

MinecraftLandRiverGen View the following youtube video to set up a world that can interact with the python programs

Setup minecraft server (Tuinity) to your directory
Setup minecraft server (Tuinity) to your directory

hapeshiva server-setup Setup minecraft server (Tuinity) for you. Support for optimization Create optimized yml Customazible server port and view dista

Automatically prepare your Minecraft maps for release

map-prepare Automatically prepare Mineraft map for release. Current state: kinda works Make sure you have backups for your world before running this p

A simple script which allows you to see how much GEXP you earned for playing in the last Minecraft Hypixel server session

Project Landscape A simple script which allows you to see how much GEXP you earned for playing in the Minecraft Server Hypixel Usage Install python 3.

PyCraft - A Minecraft launcher made in python

A Minecraft launcher made in python. The main objective of this launcher is to enable players to enjoy minecraft (especially those without a mojang/microsoft account). This launcher is not illegal as all files are downloaded from libraries.minecraft.net

 A Minecraft clone written in python and pyglet.
A Minecraft clone written in python and pyglet.

PyCraft A Minecraft clone written in python and pyglet. Running PyCraft To run PyCraft, run the following code: git clone https://github.com/TheWebCra

A project to san the internet of all open Minecraft servers.

MC-Server-Finder A project that scans the internet to find open Minecraft servers. Install the dependencies by running pip install -r requirements.txt

Releases(v0.0.2)
  • v0.0.2(Feb 1, 2022)

    v0.0.2

    Bug Fixes 🎉

    • Fix crash when no players are online (duh!)
    • Fix crash when target save directory does not exist.
      • This was mainly a problem for network locations that may not be reliably connected.
      • If only the final directory does not exist, MOPOG will create the directory and proceed.
        • EX: If C:\output\images\image.png is the target, and C:\output\ does not contain a directory called images, MOPOG will create C:\output\images. HOWEVER, if C:\output does not exist, MOPOG will NOT create C:\output OR C:\output\images.

    Improvements

    • Output program version upon startup. Useful now that there is more than one version 😁
    • Overall code cleanup to improve CODE QUALITY 🙌

    Notes:

    Full Changelog: https://github.com/elsell/MinecraftOnlinePlayersOverlayGenerator/compare/v0.0.1...v0.0.2

    🐛 As always, please create an issue if you find any bugs!

    Source code(tar.gz)
    Source code(zip)
    mopog_windows_x64_v0.0.2.exe(10.55 MB)
  • v0.0.1(Jan 21, 2022)

Owner
null
MCRPC (Minecraft Resource Pack Comparator) checks your resource pack against any version of Minecraft to show resources missing from your pack for that version.

Minecraft Resource Pack Comparator MCRPC checks your resource pack against any version of Minecraft to show resources missing from your pack for that

null 3 Nov 3, 2022
Dontdie-minecraft - A python program that causes your computer to bluescreen whenever you die in Minecraft

Don't Die - A Python Program A python program that causes your computer to blues

null 3 Apr 19, 2022
Minecraft.nix - Command line Minecraft launcher managed by nix

minecraft.nix Inspired by this thread, this flake contains derivations of both v

null 12 Sep 6, 2022
Minecraft Script to Tellraw Datapack Generator

Minecraft Script to Tellraw Datapack Geneator (STDG) can generate a chain of tellraw command in datapack from script.

null 1 Jan 28, 2022
Hexagon game. Two players: AI and User. Implemented using Alpha-Beta pruning to find optimal solution for agent.

Hexagon game. Two players: AI and User. Implemented using Alpha-Beta pruning to find optimal solution for agent.

Anton 1 Oct 18, 2021
Play a game of Phazed with a bot or with other players or watch bots play with each other

Phazed Game and Player play a game of Phazed with a bot or with other players or watch bots play with each other Live Demo hosted on repl.it (makes su

Xin Yu 0 Aug 28, 2021
Utility to find games owned by all (or at least some) of the passed players.

SteamCommonGameFinder Utility to find games that are owned by all (or at least some) of the players you pass into this programm. You can already find

Daniel O'Grady 4 Jan 4, 2022
A zombie game using Kinetic. You can control players using fingers

This is Eden Park's portpolio: Works, projects and practices This repository can be used to show the potential employers to check my works, code and p

Eden Park 4 May 16, 2022
WordleHelper suggests words to help players better enjoy the hit game Wordle

WordleHelper Introduction WordleHelper suggests words to help players better enjoy the hit game Wordle. Both the general mode and the hard mode are su

Shao-Yu, Chu 5 Jun 2, 2022
Wordle is a web-based word game. Players have six attempts to guess a five-letter word;

Wordle is a web-based word game. Players have six attempts to guess a five-letter word; feedback is given for each guess, in the form of colored tiles, indicating when letters match or occupy the correct position. This program helps solving wordle problems.

Abhishek 2 May 21, 2022