Table of Contents

Getting Started

  1. Add Nevoka.MinecraftRPC via NuGet to your C# project.
  2. Configure connection parameters (host, port, whether TLS is needed, authentication secret) matching the server’s server.properties. P12 certificate Tool
  3. Use the library’s client to connect over WebSocket.
  4. Call methods (e.g. get/set operations) or subscribe to notifications as needed.

Requirements & Compatibility

  • Your Minecraft server must be running a version that supports the Server Management Protocol (starting from snapshot 25w35a).
  • If using TLS or authentication, appropriate server properties must be set (secret, keystore, TLS enabled).
management-server-enabled=true
management-server-host=localhost
management-server-port=25585
management-server-secret=<your-secret>
management-server-tls-enabled=true
management-server-tls-keystore=path/to/keystore.p12
management-server-tls-keystore-password=<password>

Example Overview

Here’s a small conceptual snippet showing how your code might use Nevoka.MinecraftRPC:


// Create the client
await using MinecraftServerManagementClient client = new MinecraftServerManagementClient("172.16.123.123", 25585, "token", true, true);
// or use the builder pattern:
await using IMinecraftServerManagementClient client = MinecraftServerManagementBuilder.Create()
    .WithUrl("172.16.123.123")
    .WithPort(25585)
    .WithToken("token")
    .WithTLS(true)
    .WithSelfSignedCertificate(true)
    .Build();
// Listen to events before connecting
client.OnServerStatus += OnServerStatus;

await client.ConnectAsync(ct: stop.Token);

var gameMode = await client.GetGameModeAsync(stop.Token);
Console.WriteLine($"Current game mode: {gameMode}");

For a full list of events and methods: