nl.vv32.rcon:rcon

Java implementation of the RCON protocol


Keywords
java, minecraft, rcon, source-engine, synchronous
License
GPL-3.0

Documentation

RCON Java CI

Minimal implementation of the RCON protocol in Java.

Example (Java 8+)

public static void main(String[] args) throws IOException {

    try(Rcon rcon = Rcon.open("localhost", 25575)) {
        if (rcon.authenticate("password")) {
            System.out.println(rcon.sendCommand("list"));
        } else {
            System.out.println("Failed to authenticate");
        }
    }
}

Add RCON to your project

Gradle

Add to build.gradle:

repositories {
    mavenCentral()
}

dependencies {
    implementation 'nl.vv32.rcon:rcon:1.0.3'
}

Maven

Add to pom.xml:

<dependencies>
    <dependency>
        <groupId>nl.vv32.rcon</groupId>
        <artifactId>rcon</artifactId>
        <version>1.0.3</version>
    </dependency>
</dependencies>

Jar

If you're not using Gradle, you can download the latest version here.