MineSharp.Bot
0.1.3
There is a newer version of this package available.
See the version list below for details.
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MineSharp.Bot
Connect and interact with Minecraft servers.
A MinecraftBot
is a composition of multiple Plugin
s.
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 | Versions 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.
-
net7.0
- MineSharp.Commands (>= 0.1.3)
- MineSharp.Physics (>= 0.1.3)
- MineSharp.Protocol (>= 0.1.3)
- MineSharp.Windows (>= 0.1.3)
- MineSharp.World (>= 0.1.3)
-
net8.0
- MineSharp.Commands (>= 0.1.3)
- MineSharp.Physics (>= 0.1.3)
- MineSharp.Protocol (>= 0.1.3)
- MineSharp.Windows (>= 0.1.3)
- MineSharp.World (>= 0.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.