Author Options:

How to make an RCON client for minecraft?? I want to send data to my Minecraft console remotely. Answered

Hey minecraft coders/people good with computers,
I was wondering how to connect to my Minecraft server with a Remote Console/Controlled Console. I want to be able to send commands to the Console remotely (like from my phone or other computer). I dont know how to send/receive a command/commands to the Minecraft server, I can code everything else (like the text input and GUI).

What I want to be able to do:

1. Get the console log sent from my server to my RCON client into a string (then I can print the data out into a GUI or another console)

2. Send commands that I type into my text box to the server via remote access.

Thanks! If I was too vague, then please state it and I will try my best to elaborate.


The forums are retiring in 2021 and are now closed for new topics and comments.

Best Answer 8 years ago

You might want to look at the source codes of mcrcon client which is written in C. Projects sourceforge page can be found here and homepage on bukkit forums here.

Minecraft uses Valves Source rcon protocol (or at least variant of it) for its remote communication. Partial specification of the protocol can be found on valve developer wiki: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol 

You might also need network analyzing tools for debugging the network  code so I recommend you take a look at excellent Wireshark which is basically a graphical front-end for tcpdump.

Good luck with your project.