Python example plugin for Endstone servers
Project description
Endstone Python Example Plugin
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
- Click Use this template on GitHub (or fork/clone it)
- 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.* |
- Set
api_version = "0.11"(or the Endstone version you target) - 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:
- Add your changes under
## [Unreleased]inCHANGELOG.md - Go to Actions > Release > Run workflow
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07df68f0f11a31dd1112a49d95e4f86d5b87fe1017f52a28ca4b93030a7348c
|
|
| MD5 |
f04b3b30aa1b3ee8428fec19ef25e673
|
|
| BLAKE2b-256 |
3a10c35d2556559c209708e5da20544f1ea30ee3091bc3a315b49953e4e71249
|
Provenance
The following attestation bundles were made for endstone_example-0.5.0.tar.gz:
Publisher:
release.yml on EndstoneMC/python-example-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
endstone_example-0.5.0.tar.gz -
Subject digest:
f07df68f0f11a31dd1112a49d95e4f86d5b87fe1017f52a28ca4b93030a7348c - Sigstore transparency entry: 1163346390
- Sigstore integration time:
-
Permalink:
EndstoneMC/python-example-plugin@42fb2ee0f6a3e0d8dedd456c218482f1d61dfd7a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EndstoneMC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42fb2ee0f6a3e0d8dedd456c218482f1d61dfd7a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file endstone_example-0.5.0-py3-none-any.whl.
File metadata
- Download URL: endstone_example-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04ef96876dc8af67454c50f9f7549428b1b0bf755b33cf4d4340c42dd8ae117d
|
|
| MD5 |
4907451a7a42ae3398a8f43a7b4d651e
|
|
| BLAKE2b-256 |
6ce853fa5abd3b3d23e3eaba10ac930f1ca7825a032f2e78d7aa79e26c4a023f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
endstone_example-0.5.0-py3-none-any.whl -
Subject digest:
04ef96876dc8af67454c50f9f7549428b1b0bf755b33cf4d4340c42dd8ae117d - Sigstore transparency entry: 1163346518
- Sigstore integration time:
-
Permalink:
EndstoneMC/python-example-plugin@42fb2ee0f6a3e0d8dedd456c218482f1d61dfd7a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EndstoneMC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42fb2ee0f6a3e0d8dedd456c218482f1d61dfd7a -
Trigger Event:
workflow_dispatch
-
Statement type: