mirror of
https://github.com/JonasunderscoreJones/Minecraft-server-Status.git
synced 2025-10-23 02:29:18 +02:00
Delete cmd-v0.1.py
This commit is contained in:
parent
345bdc8085
commit
a2d109113e
1 changed files with 0 additions and 29 deletions
29
cmd-v0.1.py
29
cmd-v0.1.py
|
@ -1,29 +0,0 @@
|
||||||
from mcstatus import JavaServer
|
|
||||||
|
|
||||||
# You can pass the same address you'd enter into the address field in minecraft into the 'lookup' function
|
|
||||||
from mcstatus import JavaServer
|
|
||||||
|
|
||||||
ip = input("Please Enter server IP: ")
|
|
||||||
port = input("Enter Port (press enter for default port 25565): ")
|
|
||||||
|
|
||||||
if port == "":
|
|
||||||
port = "25565"
|
|
||||||
|
|
||||||
print(ip + ":" + port)
|
|
||||||
|
|
||||||
server = JavaServer.lookup(ip + ":" + port)
|
|
||||||
|
|
||||||
|
|
||||||
while True:
|
|
||||||
status = server.status()
|
|
||||||
query = server.query()
|
|
||||||
print("---------- " + ip + ":" + port + " ----------")
|
|
||||||
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"players: {status.players.online}/{status.players.max}")
|
|
||||||
print(f"Players Online: {query.players.names}")
|
|
||||||
print("\n")
|
|
Loading…
Add table
Add a link
Reference in a new issue