Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Plugin Development

Jump to bottom
Milo Weinberg edited this page Jan 30, 2021 * 5 revisions

Plugins Development

Intro to Plugin Development for PyMine

Plugin Structure

Folder Structure

  • 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

plugin.yml structure

  • This file has two optional keys (git_url and module_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 of my_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.

__init__.py structure

  • This file must contain a setup() coroutine and a teardown() 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 fastest, easiest to use, Python-based Minecraft Server.

Clone this wiki locally