Asynс lib to get information about Minecraft server https://git.orudo.ru/trueold89/mcaio
Go to file
trueold89 c0b26f1fe0
BugFix: player list now updated correctly
2024-07-13 05:40:13 +03:00
mcaio BugFix: player list now updated correctly 2024-07-13 05:40:13 +03:00
.gitignore Initial 2024-07-07 13:10:22 +03:00
README.md Add all_info property 2024-07-07 23:04:49 +03:00
setup.py BugFix: player list now updated correctly 2024-07-13 05:40:13 +03:00

README.md

MCaio

Asynс lib to get information about Minecraft Java server using SLP

Project uses code from clarence112

Install:

From Gitea

pip install --extra-index-url https://git.orudo.ru/api/packages/trueold89/pypi/simple/ mcaio

From PyPi

pip install mcaio

Build:

Deps: python3

Clone repo:

git clone https://git.orudo.ru/trueold89/mcaio --depth=1 && cd mcaio

Create venv:

python -m venv venv && . venv/bin/activate

Install SetupTools:

pip install setuptools

Build:

python3 setup.py sdist

Usage:

As lib:

Import MCServer class::

from mcaio.client import AIOMCServer as AIOMC

Create object:

mc = AIOMC("localhost", 25565)

Await property:

name = await mc.name
print(name)
# Paper 1.20.4

Properties:

Property Description
name Server name
motd Server motd
players_count Current number of players on the server
maxplayers Max number of players on the server
players_list List of current players on server
all_info Dict with all information about server

As cli:

MC_HOST=localhost MC_PORT=25565 mcaio name
# Paper 1.20.4

Args:

Arg Description
name Server name
motd Server motd
pcount Current number of players on the server
pmax Max number of players on the server
players List of current players on server
all Dict with all information about server