Running scenarios
List prepared environments and launch one discovered scenario from Gradle.
Run these commands from the Gradle project containing your AnvilScenarioDefinition classes.
Preparation compiles the source set and resolves its runtime; the selected scenario starts only
after the tooling JVM is ready.
List and start a scenario
./gradlew anvilScenarios --console=plain
./gradlew anvilRun --scenario=local-paper --console=plain
./gradlew anvilRun --definition=com.example.test.LocalPaperScenario --console=plainanvilScenarios evaluates the indexed definitions without starting Minecraft. Give anvilRun exactly one
of --scenario and --definition. A scenario name must be unique within its module;
the fully qualified definition class is always unambiguous.
Anvil prepares the declared inputs, starts every server and proxy in dependency order, and runs the setup hook. The scenario's entrypoint is the default player connection target; it does not limit which declared processes start.
Control a running environment
The interactive session supports:
startAllto start the remaining processes and complete setup;start <process>to start one prepared process;stop <process>andrestart <process>for individual lifecycle operations;stopto finish the complete scenario;quitorexitto close the runner.
Starting one process does not start its peers or execute the scenario setup hook. A whole-scenario restart prepares fresh process generations and runs setup again.