mcrcd 1.0.2

A tiny Minecraft Rcon library for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

McRcD

A tiny Minecraft Rcon library for D.

Usage


import mcrcd;
import std.stdio;

// Interactive Rcon console
void main(string[] args)
{
	auto rcon = new MCRcon();

	try
	{
		// Will connect to localhost:25575 or throw an exception if an error occurs
		rcon.connect("localhost", 25575);
	}
	catch(Exception e)
	{
		writeln("Couldn't connect!");
		writeln(e);
		return;
	}
	scope(exit) rcon.disconnect();

	// Login to Rcon
	rcon.login("password");

	while(true)
	{
		write("> ");
		MCRconResponse response = rcon.command(readln().strip());
		// MCRconResponse.unformatted automatically removes all text formatting/color codes (§code)
		writeln("  ", response.unformatted);
	}
}

Documentation

generated using MaterialDoc

Authors:
  • WebFreak001
Dependencies:
none
Versions:
2.0.0 2024-Jan-09
1.0.2 2016-Jan-06
1.0.1 2015-Dec-20
1.0.0 2015-Jun-09
~master 2024-Jan-09
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 153 downloads total

Score:
0.9
Short URL:
mcrcd.dub.pm