# Quick Start

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)\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZRn2IMyE5JYVzIGL8%2F-LpZU7lQirqsGrF4U8Tn%2F2019-09-24_19-09-08.gif?alt=media&#x26;token=3260885c-a0c3-4122-ba06-6c8bcba6b3eb" alt="" data-size="original">&#x20;
* Ensure that you have all of the necessary pre-requisites:
  * Open NuGet package manager.\
    &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZGXwuXZIHvuSKfnAx%2F-LpZGoUR3R07KKgZ-67P%2F2019-09-24_18-14-37.gif?alt=media&#x26;token=c912153c-5c87-44b0-8c48-fd40e98eba37" alt="" data-size="original">&#x20;
  * Install the **OQ.MineBot.PluginBase** package.\
    &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZGXwuXZIHvuSKfnAx%2F-LpZHTDnZtsEn0B3NhRP%2F2019-09-24_18-15-58.gif?alt=media&#x26;token=4146431f-6fa5-4c9f-8d10-e9532c06c03e" alt="" data-size="original">&#x20;
* 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:\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZPDgxPc4KEZeFbn3F%2F-LpZQUASCUImuF3NhgWm%2F2019-09-24_18-59-09.gif?alt=media&#x26;token=334e0dca-48c0-40db-aaff-dade2b178a1f" alt="" data-size="original">&#x20;
* 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:\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZPDgxPc4KEZeFbn3F%2F-LpZRecnGbxwALaQ5I-1%2Fdevenv_2019-09-24_19-04-45.png?alt=media&#x26;token=d5c243d4-6260-4b95-9f28-f44d968e1c94" alt="" data-size="original">&#x20;
* 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:\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZPDgxPc4KEZeFbn3F%2F-LpZRJLRkmxygPNjQGnq%2Fdevenv_2019-09-24_19-03-01.png?alt=media&#x26;token=65b58f60-4fa1-481d-98c1-4e5c6686f458" alt="" data-size="original">&#x20;

### 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 [Listeners](https://github.com/OnlyQubes/OQ.MineBot.PluginBase/tree/master/Base/Plugin/Listeners)):\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZW99pgh3SxvWN8ln2%2F-LpZaoPGKUA3F4LIC4yw%2F2019-09-24_19-49-01.gif?alt=media&#x26;token=6b13cc40-8dd1-47d4-a992-ea6c1f5afba6" alt="" data-size="original">&#x20;
* Implement Exec, which will tell the bot if any of the Listeners can be called, and add any listener code:\
  &#x20;<img src="https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZW99pgh3SxvWN8ln2%2F-LpZbUC1F-0yLwJSnzRz%2Fdevenv_2019-09-24_19-50-55.png?alt=media&#x26;token=bc793f23-ad55-4ff6-bfdf-3607f4bd2c02" alt="" data-size="original">&#x20;

<br>

:tada: **That's it, now you can build the plugin and test it on the bot**:tada: \
For a more in-depth guide check out the [Introduction page](https://docs.minecraftbot.com/).<br>

{% file src="<https://3614267652-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LnCwyAn9DfsyNsBpyeT%2F-LpZW99pgh3SxvWN8ln2%2F-LpZclX-neFHbqt9fVm6%2FExamplePlugin.zip?alt=media&token=e4eb8d86-b3c3-4354-8c4c-60cde6a66916>" %}
Download Template Code Here
{% endfile %}
