Package: mcipc
mcipcA Minecraft inter-process communication API implementing theRCONandQueryprotocols.News2020-12-21 - mcipc-2.0Great news:mcipcis now available in version 2.
The version 2 update includes the outsourcing of the RCON protocol and client implementation into anown project.
This allowes for the RCON library to be used independently of mcipc, e.g. for other games which support the RCON protocol.
Furthermoremcipc's RCON client implementations have been overhauled. They now provide functions to interact with the respective server.
It was therefor necessary to not have one implementation ofmcipc.rcon.Client, but three:mcipc.rcon.be.ClientClient for Bedrock Edition servers.mcipc.rcon.ee.ClientClient for Education Edition servers.mcipc.rcon.je.ClientClient for Java Edition servers.To provide some backwards compatibility, themcipc.rcon.Clientis now an alias formcipc.rcon.je.Client.
You'll find a full documentation of each client's capabilities, i.e. methods in thedocumentation.Requirementsmcipcrequires Python 3.9 or higher.
It also depends onrconwhich has been split from this project.
If you installmcicpviapip, it will automatically be installed as a dependency.DocumentationDocumentation is available onreadthedocs.Quick startInstall mcipc from theAURor via:pip install mcipcQuery protocolTheQueryprotcol is used to query a Minecraft server for server information.
The Minecraft query protocol has two query modes:basic statsandfull stats.frommcipc.queryimportClientwithClient('127.0.0.1',25565)asclient:basic_stats=client.stats()# Get basic stats.full_stats=client.stats(full=True)# Get full stats.print(basic_stats)print(full_stats)RCON protocolTheRCONprotocol is used to remotely control a Minecraft server, i.e. execute
commands on a Minecraft server and receive the respective results.frommcipc.rcon.jeimportBiome,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.withClient('127.0.0.1',5000,passwd='mysecretpassword')asclient: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)Example output of the above commands with a Java Edition client:-8217057902979500137Players(online=1,max=20,players=[Player(name='coNQP',uuid=None,state=None)])Location(name='mansion',x=-7216,y=None,z=-1952,distance=7479)Location(name='minecraft:badlands',x=1512,y=None,z=3388,distance=3634)CreditsMany thanks to all contributers to theMinecraft Wikiand theWiki.vg.LicenseCopyright (C) 2018-2021 Richard Neumannmcipc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.mcipc is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with mcipc.  If not, seehttp://www.gnu.org/licenses/.LegalMinecraft content and materials are trademarks and copyrights of
Mojang and its licensors. All rights reserved.
This program is free software and is not affiliated with Mojang.