Package Description
$ dotnet add package MinecraftRconA simple program for remote management of a Minecraft server using the RCON protocol.
Default settings, such as host address, port, and RCON password, can be changed in the Terminal.cs file under the Default Configuration section.
To run the program as a standalone application, follow these steps:
Open a terminal in the project directory.
Run the application using the following command:
dotnet run
Upon launch, enter the required information such as host address, port, and RCON password.
If you want to use this project as a NuGet package in your own project, follow these steps:
Install the NuGet package using the package manager console:
Install-Package MinecraftRcon
In your code, you can use the Client class to interact with the Minecraft server using RCON:
using MinecraftRcon;
class Program
{
static async Task Main(string[] args)
{
var host = "your_server_host";
var port = 25575;
var password = "your_rcon_password";
using var client = new Client(host, port);
if (await client.AuthenticateAsync(password))
{
var command = "your_minecraft_command";
var response = await client.SendCommandAsync(command);
Console.WriteLine(response?.Body ?? "Command failed");
}
else
{
Console.WriteLine("Authentication failure");
}
}
}
rallez
Discord: rallez Email: rallezg1@gmail.com
This project is licensed under the MIT License - see the LICENSE.md file for details.