Choose an API
Separate native Go contracts, WIT and client compatibility.
On this page
Typed Content: items and blocks
For ordinary native Go content, use module.TypedContent(ctx) during Load: typed semantic definitions, enabled-stack resource validation, per-protocol lowering and atomic publication/freeze before players. This API documentation follows core commit 8f711a26; source/wire checks do not certify live-client acceptance.
Which path to use
core/module: Descriptor → Load → Start → Stop, supplied throughhost.Options.Modules.core/plugin: Name → Init → Start → Stop; gameplay handles andContext.NewVirtualInventory.- WASM:
plugin.json, a component, host policy and a separate worker. A Go interface is not an ABI.
Exact module path
import (
"github.com/pulce-core/Pulce/core/module"
"github.com/pulce-core/Pulce/core/plugin"
"github.com/pulce-core/Pulce/host"
)Errors and ownership
errors.Is(err, plugin.ErrPluginStopped)errors.Is(err, plugin.ErrStaleHandle)errors.Is(err, gameplay.ErrOperationCancelled)—plugin.ErrHandleOperationCancelledis an alias.errors.Is(err, item.ErrInvalidStack)
State is server-owned. Single-slot setters reject invalid, negative and oversized stacks without changing the slot; count=0 clears. Give/Add can distribute counts over multiple slots.
Compatibility checks
Manifest: api/public-packages.txt; snapshot: api/public-api.txt. go run ./tools/apicheck compiles real external consumers and checks snapshot drift. Runtime/network/server internals are not stable plugin API.