KRPC#

Provides functionality to interact with the server: its status and services, the connected clients, the game scene and pause state, and holding the game on a physics tick. The expressions build server side functions.

Example#

The following example prints the version of the server:

import krpc.client.Connection;
import krpc.client.services.KRPC;


public class KRPCExample {
    public static void main(String[] args) {
        Connection connection = Connection.newInstance("KRPC Example");
        System.out.println(
            KRPC.newInstance(connection).getStatus().getVersion());
        connection.close();
    }
}