Skip to content

About

A reference plugin for Basalt Server's plugin API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

Basalt Basalt

ServerPlugin-Example

A reference plugin for Basalt Server's Lua plugin API.

Java Edition Lua Plugin API License

About

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

Trying it

cp -r ServerPlugin-Example /path/to/server/plugins/example

Join 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.

License

GPL-3.0.

Basalt is not affiliated with Mojang Studios or Microsoft. Minecraft is a trademark of Mojang Studios.

About

A reference plugin for Basalt Server's plugin API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages