-
Notifications
You must be signed in to change notification settings - Fork 37
Plugin Development
Milo Weinberg edited this page Jan 30, 2021
·
5 revisions
Intro to Plugin Development for PyMine
-
plugins
[folder]-
my_plugin
[folder]-
__init__.py
- contains necessary setup/teardown coroutines and other plugin code, can import other files, is required. -
plugin.yml
- contains information necessary to load the plugin properly, is required. -
requirements.txt
- contains all dependencies for the plugin. These are installed automatically and updated every startup. - any other files / folders the plugin needs
-
-
- This file has two optional keys (
git_url
andmodule_folder
)-
git_url
is the url of the plugin's git repository, if present, PyMine will automatically update the plugin. -
module_folder
allows the necessary plugin files to be in a sub-folder. Example:my_plugin/src/__init__.py
instead ofmy_plugin/__init__.py
.
-
- The contents of plugin.yml is passed to the
setup()
coroutine of a plugin, therefore plugins may use it as their config file.
- This file must contain a
setup()
coroutine and ateardown()
coroutine.- The
setup()
coroutine will be called when the plugin is initialized. This function takes two args, the server instance and the plugin.yml data (dict). - The
teardown()
coroutine will be called when the plugin is unloaded. This function takes just one arg, the server instance.
- The
The fastest, easiest to use, Python-based Minecraft Server.