FalconFalcon
Docs menuPlugin overview

Plugins

Plugin overview

The server loads each folder of plugins/ that has a plugin.json. The API lives in the PluginAPI repository, at version 1.0.5, with examples for each runtime in examples/.

Choosing a runtime

runtimeUse it forGuide
wasmNew plugins. Sandboxed, any language with WIT bindings for core modulesWasm
native (default)Raw performance, through the C APINative C++
javaJava 22 pluginsJava
internalFull access to server classes, tied to one buildInternal
dotnetDeprecated: existing C# plugins onlyC#

All of them sit on one C ABI, falcon_api.h, so a feature exists once for every language. A native plugin runs on any server with the same API major version.

plugin.json

{
  "name": "HelloPlugin",
  "version": "1.0.0",
  "api-version": "1.0",
  "main": "HelloPlugin",
  "runtime": "native",
  "authors": ["Falcon-MC"],
  "description": "Greets players",
  "depend": [],
  "softdepend": [],
  "loadbefore": []
}
FieldRules
nameRequired. Up to 64 letters, digits, _ or -. Must be unique
versionRequired
mainRequired. Library name (native, internal), .wasm file (wasm), or full class name (java, dotnet)
runtimeDefaults to native
api-versionRequired for native and java. Must have the server's major version and be no newer than the server's API
jarjava only, defaults to <name>.jar
assemblydotnet only, defaults to <name>.dll
dependPlugins that must load first. A missing one stops this plugin
softdependLoad first when present
loadbeforePlugins this one loads before
authors, descriptionOptional

Plugin folders

plugins/
  HelloPlugin/
    plugin.json
    libHelloPlugin.so
    data/
    resource_pack/

The server creates data/, returned by dataFolder(). A resource_pack/ folder with a manifest.json is loaded as a resource pack under the plugin's name.

What a plugin gets

AccessorPage
events()Events
commands(), permissions()Commands and permissions
scheduler(), config(), logger()Scheduler and config
content()Custom content
services()Services
Player::sendPacket, packet eventsPackets
Server, Player, Entity, Level, ItemGame objects