Public API
Notes for external Go modules consuming the documented plugin surface.
In this section
Related section pages:
Async Ownership Model
Public plugins should treat core objects as server-owned. Work that touches world, player, entity, inventory, session, storage, or resource-pack state must route through ctx.Gameplay(), handles, or another core service.
- Do not spawn plugin goroutines that directly mutate runtime internals.
- Use scheduler tasks for tick-timed gameplay callbacks.
- Use core async jobs for background IO/preparation, then commit results through server-owned services.
- Task lifecycle events use the
server.task.*namespace. - Hosts can inspect plugin async backpressure with
plugin.Manager.TaskStats().
Import Map
Use the documented public entry package list when building external plugins.
imports.go
import ( "github.com/pulse-core/Pulse/core/plugin" "github.com/pulse-core/Pulse/core/content" "github.com/pulse-core/Pulse/core/gameplay" "github.com/pulse-core/Pulse/core/command" "github.com/pulse-core/Pulse/core/event")module.txt
github.com/pulse-core/PulseMinimal Integration
Implement plugin.Plugin, register handlers in Init, and perform gameplay mutations via ctx.Gameplay() so runtime validation remains consistent.
- Create a Go module that depends on
github.com/pulse-core/Pulse. - Implement plugin.Plugin and keep handler cleanup scoped to the plugin.
- Use request-style APIs only where compatibility requires it.
- Use handle-based gameplay for new mutation logic.
- Register factories only when loading by name is required.
- Run against docs/test-server.md for quick in-game validation.