ExamplePlugin source
The first-party starting project used by these docs, pinned to 3b3aa013ac94.
BedrioxDOCUMENTATIONStart from working first-party source, use the matching API, and package it with PluginTools.
The first-party starting project used by these docs, pinned to 3b3aa013ac94.
Validate source plugins and package a tested project into a distributable PHAR.
Download PluginTools.pharSHA-256 checksumRelease notesThis tree is generated from the exact ExamplePlugin revision used for this documentation. Keep the manifest at the project root and put namespaced PHP classes under src/.
ExamplePlugin/
├── plugin.json
├── composer.json
├── src/
│ ├── Command/
│ │ ├── DisplayMode.php
│ │ ├── ExampleBroadcastCommand.php
│ │ ├── ExampleDisplayCommand.php
│ │ ├── ExampleEffectCommand.php
│ │ ├── ExampleSenderCommand.php
│ │ └── ExampleSpawnCommand.php
│ ├── Entity/
│ │ ├── ExampleMobBehavior.php
│ │ └── ExampleMobStateCodec.php
│ └── Main.php
├── resources/
│ └── config.yml
└── tests/plugin.jsonDeclares the plugin name, version, compatible API range, entry class, namespace, dependencies, and load phase.
src/Main.phpYour entry class extends Plugin. Bedriox creates it and calls its lifecycle methods.
resources/Package default configuration and other server-side files here. Bedriox copies editable files into the plugin data directory.
src/Command/ and other foldersOrganize commands, listeners, entities, and other classes beneath the namespace declared by the manifest.
tests/Keep automated checks beside the plugin project so behavior can be verified before packaging a PHAR.
This is the real plugin.json from that same scanned revision:
{
"schema": 1,
"name": "ExamplePlugin",
"version": "0.1.0",
"api": "^0.4",
"main": "Bedriox\\ExamplePlugin\\Main",
"namespace": "Bedriox\\ExamplePlugin",
"authors": ["Bedriox Team"],
"dependencies": [],
"softDependencies": [],
"load": "WORLD_READY"
}Bedriox plugins are trusted PHP programs that run inside the server process.
Start with the first-party ExamplePlugin, keep work bounded, and use only the
public Bedriox\Api surface documented here.
Player, world, inventory, and entity objects are authoritative server
capabilities rather than ordinary mutable data. Register commands, event
subscribers, recipes, and custom entities from onEnable(), and keep callbacks
short enough that they cannot stall the server tick.
PluginTools.phar using the buttons above.plugins/ directory and place
PluginTools.phar beside it.plugin.json, especially its name, version, API range, main class,
namespace, dependencies, and load phase.makeplugin ExamplePlugin when the plugin is ready.Run makeplugin ExamplePlugin from the server console. PluginTools validates
the source definition and packages it for distribution. Keep the generated
checksum with the PHAR when publishing a release.
Use the version picker in the documentation header. API pages identify the exact Bedriox and ExamplePlugin commits used to generate them. Direct packet access is version-specific; prefer high-level player, world, inventory, command, event, and scheduler APIs whenever possible.