Skip to main content

Python example plugin for Endstone servers

Project description

Endstone Python Example Plugin

Build

A starter template for building Endstone plugins in Python. Endstone is a plugin framework for Minecraft Bedrock Dedicated Server, similar to Bukkit/Spigot/Paper for Java Edition. This template demonstrates commands, events, configuration, and permissions.

Use This Template

  1. Click Use this template on GitHub (or fork/clone it)
  2. Rename the following to match your plugin:
What Where Example
Package name pyproject.toml [project] name endstone-my-plugin
Package directory src/endstone_example/ src/endstone_my_plugin/
Entry point pyproject.toml [project.entry-points."endstone"] my-plugin = "endstone_my_plugin:MyPlugin"
Plugin class plugin.py class name + prefix MyPlugin, prefix = "MyPlugin"
Permission prefix plugin.py permissions dict keys my_plugin.command.*
  1. Set api_version = "0.11" (or the Endstone version you target)
  2. Delete the example command/listener code and start building

Development

This template uses uv for fast dependency management. If you prefer pip, replace uv sync with pip install -e ".[dev]" and uv run with just running the command directly.

git clone https://github.com/EndstoneMC/python-example-plugin.git
cd python-example-plugin
uv sync --extra dev       # Install dependencies
uv run ruff check src/    # Lint

For live development on a running server, activate the server's virtualenv and install in editable mode:

pip install -e .

Then use /reload in-game to pick up code changes without restarting.

Project Structure

src/endstone_example/
  __init__.py       Re-exports the plugin class
  plugin.py         Plugin lifecycle, commands, config
  listener.py       Event listener (player join/quit)
  config.toml       Default config (copied on first run)

Adding Dependencies

To use third-party packages from PyPI, add them to the dependencies list in pyproject.toml:

[project]
dependencies = ["requests>=2.31", "aiosqlite>=0.19"]

Then run uv sync (or pip install -e .) to install them. They will be bundled automatically when you build the wheel.

Install on a Server

uv build

Copy the .whl from dist/ into your server's plugins/ folder and restart.

Releasing

This template includes a GitHub Actions release workflow. To make a release:

  1. Add your changes under ## [Unreleased] in CHANGELOG.md
  2. Go to Actions > Release > Run workflow
  3. Enter the version (e.g. 0.5.0) and run

The workflow validates the version, updates the changelog, creates a git tag and GitHub release, builds the wheel, publishes to PyPI (if configured), and attaches the .whl to the release.

Use dry run to preview without making changes.

Versioning is handled automatically by hatch-vcs: tagged commits get clean versions (e.g. 0.5.0), untagged commits get dev versions (e.g. 0.5.1.dev3).

Documentation

For more on the Endstone API, see the documentation.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

endstone_example-0.5.0.tar.gz (111.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

endstone_example-0.5.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file endstone_example-0.5.0.tar.gz.

File metadata

  • Download URL: endstone_example-0.5.0.tar.gz
  • Upload date:
  • Size: 111.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for endstone_example-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f07df68f0f11a31dd1112a49d95e4f86d5b87fe1017f52a28ca4b93030a7348c
MD5 f04b3b30aa1b3ee8428fec19ef25e673
BLAKE2b-256 3a10c35d2556559c209708e5da20544f1ea30ee3091bc3a315b49953e4e71249

See more details on using hashes here.

Provenance

The following attestation bundles were made for endstone_example-0.5.0.tar.gz:

Publisher: release.yml on EndstoneMC/python-example-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file endstone_example-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for endstone_example-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04ef96876dc8af67454c50f9f7549428b1b0bf755b33cf4d4340c42dd8ae117d
MD5 4907451a7a42ae3398a8f43a7b4d651e
BLAKE2b-256 6ce853fa5abd3b3d23e3eaba10ac930f1ca7825a032f2e78d7aa79e26c4a023f

See more details on using hashes here.

Provenance

The following attestation bundles were made for endstone_example-0.5.0-py3-none-any.whl:

Publisher: release.yml on EndstoneMC/python-example-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page