Comment on page
A quick start on writing plugins for OQ.MineBot. This can be seen as a tl;dr version of the Introduction, however it's still highly recommended to read the Introduction section.
To get quickly started with plugin making simply follow these instructions:
- Create a Class Library (.NET Framework)
- Ensure that you have all of the necessary pre-requisites:
- Open NuGet package manager.
- Install the OQ.MineBot.PluginBase package.
- Every plugin is required to have a PluginCore which is used for things like defining attributes like the name of the plugin, version, and description:
- Then you will need to have an OnLoad method which will be called once the plugin is loaded/reloaded, which is usually when the bot is started. The settings are optional and can be overwritten if you don't want to include any settings:
- Finally, you will need an OnStart method which will register all of your task classes and is called as soon as the plugin is started on a bot:
- Create a task class, which will allow you to interact with the bot and it's environment.
- Implement Exec, which will tell the bot if any of the Listeners can be called, and add any listener code:
Download Template Code Here