mirror of
https://github.com/JonasunderscoreJones/Minecraft-server-Status.git
synced 2025-10-22 18:29:17 +02:00
Simplified cmd-v0.7.py
This commit is contained in:
parent
b904867545
commit
e51a5e505b
1 changed files with 23 additions and 0 deletions
23
cmd-simple-v1.py
Normal file
23
cmd-simple-v1.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
from mcstatus import JavaServer
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
ip = input("Please Enter server IP: ")
|
||||||
|
|
||||||
|
server = JavaServer.lookup(ip)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
status = server.status()
|
||||||
|
query = server.query()
|
||||||
|
ping = server.ping()
|
||||||
|
print("---------- " + ip + " ----------")
|
||||||
|
print(f"version: v{status.version.name} (protocol {status.version.protocol})")
|
||||||
|
print(f'description: "{status.description}"')
|
||||||
|
|
||||||
|
print(f"host: {query.raw['hostip']}:{query.raw['hostport']}")
|
||||||
|
print(f"software: v{query.software.version} {query.software.brand}")
|
||||||
|
print(f"plugins: {query.software.plugins}")
|
||||||
|
print(f"ping: {ping} ms")
|
||||||
|
print(f"players: {status.players.online}/{status.players.max}")
|
||||||
|
print(f"Players Online: {query.players.names}")
|
||||||
|
print("\n")
|
||||||
|
sleep(5)
|
Loading…
Add table
Add a link
Reference in a new issue