MineBot Plugin API
  • Introduction
  • Quick Start
  • Examples
    • Start Plugins
      • Events (basic)
      • Movement (basic)
      • Killaura (intermediate)
      • Wheat Farmer (intermediate)
    • Request Plugins
      • Chat (advanced)
    • Macro Component Additions
    • Botting Command Additions
    • BotViewer Additions
      • Base Extension
      • Chat Command Based Extension
  • API
    • ID System (Item & Block ids)
    • Events
    • Context
      • Player
      • Entities
        • IPlayerEntity
        • IMobEntity
        • IObjectEntity
      • World
        • IBlock
      • Containers
        • IWindow
        • ISlot
      • Functions
    • Utility
      • ChestMap
      • LocationBlacklistCollection
      • LocationWhitelistCollection
Powered by GitBook
On this page
  • Part 1: creating project and setting up dependencies.
  • Part 2: creating tasks

Quick Start

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.

PreviousIntroductionNextStart Plugins

Last updated 5 years ago

To get quickly started with plugin making simply follow these instructions:

Part 1: creating project and setting up dependencies.

  • 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:

Part 2: creating tasks

  • Create a task class, which will allow you to interact with the bot and it's environment.

  • Inherit from ITask (and optionally any of the ):

  • Implement Exec, which will tell the bot if any of the Listeners can be called, and add any listener code:

That's it, now you can build the plugin and test it on the bot For a more in-depth guide check out the .

🎉
🎉
Listeners
Introduction page
3KB
ExamplePlugin.zip
archive
Download Template Code Here