mcrcd 1.0.2

A tiny Minecraft Rcon library for D


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

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:
1.0.2 2016-Jan-06
1.0.1 2015-Dec-20
1.0.0 2015-Jun-09
~master 2016-Jan-06
Show all 4 versions
Stats:

statistics are temporarily disabled.