Minecraft 服务器状态查询工具,支持 Java 版和 Bedrock 基岩版
Project description
mcping
Minecraft server status query tool supporting both Java and Bedrock editions.
Installation
pip install 100-mcping
Usage
# Java Edition
mcping hypixel.net
# Specify port
mcping my.server.com -p 25565
# Bedrock Edition
mcping play.hydrogen.rip -p 19132 --bedrock
# Output JSON
mcping hypixel.net --json
# Other options
mcping my.server.com --player-limit 20 # Show more players
mcping my.server.com --no-players # Hide player list
mcping my.server.com --no-srv # Disable SRV resolution
mcping my.server.com --timeout 15 # Adjust timeout
As a Python Library
import asyncio
from mcping.java_ping import mcping as java_ping
from mcping.bedrock_ping import mcping_bedrock
async def main():
# Java Edition
result = await java_ping("hypixel.net")
if result.success:
print(f"Latency: {result.latency_ms}ms")
print(f"Online: {result.players_online}/{result.players_max}")
# Bedrock Edition
result_bedrock = await mcping_bedrock("play.hydrogen.rip", 19132)
if result_bedrock.success:
print(f"Latency: {result_bedrock.latency_ms}ms")
asyncio.run(main())
Options
| Option | Description | Default |
|---|---|---|
host |
Server address | Required |
-p, --port |
Port | Java: 25565 / Bedrock: 19132 |
-b, --bedrock |
Bedrock Edition | — |
--timeout |
Timeout in seconds | 10 |
--player-limit |
Max players to show | 5 |
--no-players |
Hide player list | — |
--no-srv |
Disable SRV resolution | — |
--json |
JSON output | — |
License
GPLv3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
100_mcping-1.0.0.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 100_mcping-1.0.0.tar.gz.
File metadata
- Download URL: 100_mcping-1.0.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca2e62cb453537014308cbf1abce257fbf92b0f5ca32ab762b7552b6591aefc
|
|
| MD5 |
872403dedbb4c0c8a662bfd8b6927dc2
|
|
| BLAKE2b-256 |
f95709178366ce6337f98c4d3d67a6f074b4506e2a53834106efa63621899339
|
File details
Details for the file 100_mcping-1.0.0-py3-none-any.whl.
File metadata
- Download URL: 100_mcping-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45a46f0c12e80ac5f1b9989333bf8efd5b5594e83b646a8119f40634656b3733
|
|
| MD5 |
1c0d1478739f14ab22b18183886a2d6e
|
|
| BLAKE2b-256 |
5180ad8c025c9381fb371aa64917c7c1ba273a3005f975a3a65f004a1f1cead0
|