from mcipc.rcon.je import Biome, Client # For Java Edition servers.
#from mcipc.rcon.be import Client # For Bedrock Edition servers.
#from mcipc.rcon.ee import Client # For Education Edition servers.
with Client('127.0.0.1', 25565, passwd='7894') as client:
seed = client.seed # Get the server's seed.
players = client.list() # Get the server's players info.
mansion = client.locate('mansion') # Get the next mansion's location.
badlands = client.locatebiome(Biome.BADLANDS) # Get the next location of a badlands biome.
print(seed)
print(players)
print(mansion)
print(badlands)
I get:
Traceback (most recent call last):
File "d:\Coding\Python\MinecraftServerWrapper\test.py", line 13, in <module>
with Client('127.0.0.1', 25565, passwd='7894') as client:
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\client.py", line 31, in __enter__
self.connect(login=True)
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\client.py", line 56, in connect
self.login(self.passwd)
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\source\client.py", line 29, in login
response = self.communicate(request)
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\source\client.py", line 19, in communicate
return self.read()
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\source\client.py", line 24, in read
return Packet.read(file)
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\source\proto.py", line 116, in read
type_ = Type.read(file)
File "C:\Users\ilaik\AppData\Roaming\Python\Python39\site-packages\rcon\source\proto.py", line 77, in read
return cls(LittleEndianSignedInt32.read(file))
File "C:\Program Files\Python39\lib\enum.py", line 384, in __call__
return cls.__new__(cls, value)
File "C:\Program Files\Python39\lib\enum.py", line 702, in __new__
raise ve_exc
ValueError: 1936613746 is not a valid Type
Just wanted to make sure this isn't a problem in your library and if it is how to fix it.
When running:
I get:
Just wanted to make sure this isn't a problem in your library and if it is how to fix it.