You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A powerful, language-agnostic plugin system for [Dragonfly](https://github.com/df-mc/dragonfly)Minecraft Bedrock servers using gRPC and Protocol Buffers.
3
+
Write plugins for your Minecraft Bedrock server in whatever language you love. This gRPC bridge sits on top of the [Dragonfly](https://github.com/df-mc/dragonfly)server and lets external processes stream protobuf events and actions without touching the core runtime.
4
4
5
-
## Why Dragonfly's Plugin System?
5
+
## Why Dragonfly Plugins?
6
6
7
-
| Benefit | Description | Use Case |
8
-
|---------|-------------|----------|
9
-
| 🌍 **Any Language**|Write plugins in JavaScript, TypeScript, PHP, Python, Rust, C++, or any language with gRPC support | Use the language your team knows best|
10
-
| 💰 **Sell Plugins**| Compile to binary (Rust, Go, C++) and distribute without source code | Create commercial plugins|
11
-
| 🔥 **Hot Reload**| Edit JS/TS/PHP plugins and see changes instantly - no server restart needed | Develop and debug plugins in real-time|
12
-
| 📱 **Remote Control**| Plugins connect over gRPC - run them anywhere (phone app, cloud service, discord bot) | Build mobile admin apps|
13
-
| 📦 **Use Any Library**|Import npm packages on a Go server, use Python ML libraries, etc. | Leverage entire ecosystems|
14
-
| ⚡ **Zero Performance Impact**| Plugins run in separate processes - slow/heavy plugin code doesn't affect server TPS| Run intensive tasks without lag|
15
-
| 🚀 **High Performance (COMING SOON)**|Optimized protobuf protocol with optional batching for low latency | Handle 100+ players with movement events|
16
-
| 🔒 **Sandboxing**|Control what plugins can access via gRPC permissions | Host untrusted plugins safely|
7
+
| Benefit | Description |
8
+
|---|---|
9
+
| 🌍 **Any Language**| JavaScript, TypeScript, PHP, Python, Rust, C++, Go—if it can speak gRPC, it can be a plugin.|
10
+
| 💰 **Sell Plugins**| Compile to a binary (Rust, Go, C++) and ship closed-source builds.|
11
+
| 🔥 **Hot Reload**| Edit JS/TS/PHP plugins while the server runs; changes apply immediately.|
12
+
| 📱 **Remote Control**| Plugins connect over gRPC, so you can run them on your phone, a web app, or a remote service.|
13
+
| 📦 **Use Any Library**|Mix npm packages, Python ML libs, or anything else your runtime supports.|
14
+
| ⚡ **Zero Performance Impact**| Plugins live in separate processes, so heavy work never blocks Dragonfly’s TPS.|
15
+
| 🚀 **High Performance (SOON)**|The protocol is optimized protobuf with room for batching.|
16
+
| 🔒 **Sandboxing**|Grant only the permissions each plugin needs over the gRPC interface.|
1. Copy an example from `examples/plugins/` or start fresh with `proto/types/plugin.proto`.
85
+
2. Run `make proto` (or `buf generate` with your template) to refresh client stubs.
86
+
3. Add your command + args + socket info to `cmd/plugins/plugins.yaml`.
87
+
4. Implement the handshake: reply to `PluginHello`, register commands, then send `EventSubscribe`.
88
+
5. Handle streamed events and reply with `ActionBatch` or `EventResult` messages. Because plugins speak gRPC, they can run locally, over loopback TCP, or on a remote machine.
256
89
257
-
258
-
## Protobuf generation
259
-
to generate our protobuf types, you will need to install [buf](https://buf.build/docs/cli/installation/) and protoc-gen-go:
90
+
## Development Workflow
260
91
261
92
```bash
262
-
# Install buf
263
-
# Follow instructions at https://buf.build/docs/cli/installation/
264
-
265
-
# Install protoc-gen-go
266
-
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
93
+
make proto # regenerate protobuf artifacts + post-gen scripts
94
+
go test ./... # run all Go suites
95
+
make run # launch Dragonfly host with sample config
96
+
npm run dev --prefix examples/plugins/typescript # TypeScript live dev
0 commit comments