A reference plugin for Basalt Server's Lua plugin API.
A greeter that pays coins for playing, a leaderboard and a shop to spend them in. It shows what a real plugin looks like against the native Lua API, and its code tracks the API as it evolves.
It is a .bspkg in source form (plugin.toml, code under src/, everything else under resources/), so dropping it
into plugins/ as a loose folder loads it exactly as it would packed.
| File | API surface |
|---|---|
src/coins.lua |
player.data, a balance stored per plugin |
src/events.lua |
on("player.join", ...), every(...), placeholder(...) |
src/shop.lua |
menu{...} with click handlers |
src/commands.lua |
cmd(...) with literal, word and ranged int arguments |
resources/ |
config.toml and lang/en_us.toml messages |
cp -r ServerPlugin-Example /path/to/server/plugins/exampleJoin to get a welcome bonus, use /coins and /coins top, and /shop to spend them. The
Kiln check runs on every push; fork this repository for your own plugin and
it runs there too.
Basalt is not affiliated with Mojang Studios or Microsoft. Minecraft is a trademark of Mojang Studios.