MineSharp.Bot 0.1.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package MineSharp.Bot --version 0.1.3                
NuGet\Install-Package MineSharp.Bot -Version 0.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MineSharp.Bot" Version="0.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MineSharp.Bot --version 0.1.3                
#r "nuget: MineSharp.Bot, 0.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MineSharp.Bot as a Cake Addin
#addin nuget:?package=MineSharp.Bot&version=0.1.3

// Install MineSharp.Bot as a Cake Tool
#tool nuget:?package=MineSharp.Bot&version=0.1.3                

MineSharp.Bot

Connect and interact with Minecraft servers.
A MinecraftBot is a composition of multiple Plugins.
Currently, these are the default plugins:

  • Chat Plugin (Read and Write chat messages)
  • Crafting Plugin (Craft items)
  • Entity Plugin (Keeps track of entities)
  • Player Plugin (Keeps track of the bot himself as well as other players and the weather)
  • Window Plugin (Bot's inventory and open chests or other blocks)
  • World Plugin (Keep track of the world)

Example

This is an example for a simple chat bot.

using MineSharp.Bot;
using MineSharp.Bot.Plugins;

MinecraftBot bot = await MinecraftBot.CreateBot(
    "MineSharpBot",
    "127.0.0.1",
    25565,
    offline: true);

var chat = bot.GetPlugin<ChatPlugin>();

if (!await bot.Connect()) 
{
    Console.WriteLine("Could not connect to server!");
    Environment.Exit(1);
}

while (true)
{
    var input = Console.ReadLine();
    if (input == "exit") 
    {
        await bot.Disconnect();
        break;
    }
    
    if (input != null)
        await chat.SendChat(input);
}

TODO: Docs for every plugin

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.11 136 7/28/2024
0.1.10 122 7/20/2024
0.1.9 114 7/8/2024
0.1.8 128 5/18/2024
0.1.7 130 5/5/2024
0.1.6 119 5/4/2024
0.1.5 135 4/1/2024
0.1.4 168 1/26/2024
0.1.3 163 1/7/2024
0.1.2 148 12/30/2023
0.1.1 108 12/28/2023
0.1.0 130 12/28/2023