Metadata-Version: 2.4
Name: 100-mcping
Version: 1.0.0
Summary: Minecraft 服务器状态查询工具，支持 Java 版和 Bedrock 基岩版
Project-URL: Homepage, https://github.com/Little100/mcping
Project-URL: Repository, https://github.com/Little100/mcping
Project-URL: Documentation, https://github.com/Little100/mcping#readme
Author-email: Little_100 <2662308929@qq.com>
License-Expression: GPL-3.0-or-later
Keywords: bedrock,minecraft,ping,server,srv,status
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Internet
Classifier: Topic :: System :: Networking
Requires-Python: >=3.10
Requires-Dist: click>=8.0.0
Requires-Dist: dnspython>=2.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: hatch>=0.4.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# mcping

Minecraft server status query tool supporting both Java and Bedrock editions.

## Installation

```bash
pip install 100-mcping
```

## Usage

```bash
# 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

```python
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
