# plazmamc/plazmabukkit architecture

> Architecture diagram of the GitHub repository plazmamc/plazmabukkit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/plazmamc/plazmabukkit
- Repository: https://github.com/plazmamc/plazmabukkit

## Overview

#### Purpose and Deliverable
Plazma is a JVM Minecraft server distribution derived from Paper and Purpur, focused on performance, stability, configurable behavior, and plugin compatibility. Its deliverable is a patched server/API build rather than a standalone web service. Gradle is the primary build entry point: `build.gradle.kts`, `settings.gradle.kts`, and `gradlew`.

#### Upstream Patch Pipeline
The repository’s central architecture is layered customization of upstream Minecraft, Paper, and Purpur sources. Ordered patch series encode most product behavior:
- Minecraft/runtime changes: `plazma-server/minecraft-patches/features`
- Paper server changes: `plazma-server/paper-patches/features`
- Purpur additions: `plazma-server/purpur-patches/features`
- API-level Paper changes: `plazma-api/paper-patches/features`

Scripts support updating and applying this upstream-derived source state: `scripts/updateUpstream.sh`, `scripts/apatch.sh`, `build-data/dev-imports.txt`.

#### Server Runtime Extensions
The server module supplies Plazma-owned code injected into the patched server runtime. Branding and command-line/runtime options are defined in `plazma-server/src/main/java/org/plazmamc/plazma/ServerBrandConstants.java` and `plazma-server/src/main/java/org/plazmamc/plazma/Options.java`. Server commands are routed through `plazma-server/src/main/java/org/plazmamc/plazma/command/PlazmaCommands.java`, including reload and version subcommands.

#### Configuration Boundary
Plazma centralizes global and per-world configuration separate from upstream patch logic:
- `plazma-server/src/main/java/org/plazmamc/plazma/configuration/PlazmaConfigurations.java`
- `plazma-server/src/main/java/org/plazmamc/plazma/configuration/GlobalConfiguration.java`
- `plazma-server/src/main/java/org/plazmamc/plazma/configuration/WorldConfiguration.java`

Configuration is loaded into server behavior and is exposed operationally through the reload command. Patches explicitly rewrite Paper configuration and establish Plazma-specific settings, making configuration compatibility a key boundary with upstream.

#### Performance and Concurrency
Performance work is split between broad patch-based changes and local runtime utilities. The patch series includes async mob spawning, chunk/entity ticking reductions, allocation reductions, activation controls, and profiling removal under `plazma-server/minecraft-patches/features`. Local coordination utilities include `plazma-server/src/main/java/org/plazmamc/plazma/util/AsyncExecutor.java` and `plazma-server/src/main/java/org/plazmamc/plazma/util/TickingController.java`; these are sensitive concurrency boundaries because they affect the Minecraft tick lifecycle.

#### API and SIMD Capability
The API module adds SIMD-aware map-palette conversion. Capability detection and fallback selection live in:
- `plazma-api/src/main/java/org/plazmamc/plazma/simd/SIMDChecker.java`
- `plazma-api/src/main/java/org/plazmamc/plazma/simd/SIMDDetection.java`
- `plazma-api/src/main/java/org/plazmamc/plazma/simd/VectorMapPalette.java`

This isolates hardware/vector-runtime detection from server gameplay code while allowing optimized rendering paths when supported.

#### Validation and Delivery Infrastructure
`test-plugin` is a Paper-plugin integration fixture, with lifecycle/bootstrap entry points in `test-plugin/src/main/java/org/plazmamc/testplugin/TestPlugin.java` and descriptor `test-plugin/src/main/resources/paper-plugin.yml`. CI runs through GitHub Actions (`.github/workflows/gradle.yml`) and Jenkins (`Jenkinsfile`). External project-facing services referenced by the README include Plazma’s API/CDN endpoints, documentation, Discord, and bStats; they are not represented as runtime source integrations in this tree.

Main entry points: [`scripts/updateUpstream.sh`](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/scripts/updateUpstream.sh) (Upstream update scripts), [`build.gradle.kts`](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/build.gradle.kts) (Gradle build), [`plazma-server/minecraft-patches/features`](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/minecraft-patches/features) (Minecraft feature patches), [`plazma-server/paper-patches/features`](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/paper-patches/features) (Paper server patches)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_build["Build &amp; patch pipeline"]
  node_gradle{{"Gradle build<br/>build entry point<br/>[build.gradle.kts]"}}
  node_upstream_update["Upstream update scripts<br/>patch tooling<br/>[updateUpstream.sh]"]
  node_dev_imports["Development imports<br/>source manifest<br/>[dev-imports.txt]"]
  node_minecraft_patches["Minecraft feature patches<br/>ordered patch series"]
  node_paper_patches["Paper server patches<br/>ordered patch series"]
  node_purpur_patches["Purpur additions<br/>ordered patch series"]
  node_api_patches["Paper API patches<br/>ordered patch series"]
  node_patched_server["Patched server distribution<br/>JVM server artifact"]
end

subgraph group_server["Server runtime"]
  node_branding_options["Branding &amp; options<br/>runtime bootstrap<br/>[Options.java]"]
  node_commands["Server commands<br/>command router"]
  node_configuration["Configuration boundary<br/>global and world config"]
  node_tick_coordination["Tick coordination<br/>concurrency utilities"]
end

subgraph group_api["API capability"]
  node_simd_detection["SIMD capability detection<br/>hardware capability<br/>[SIMDDetection.java]"]
  node_vector_palette["Vector map palette<br/>API optimization"]
end

subgraph group_delivery["Validation &amp; delivery"]
  node_test_plugin["Test plugin fixture<br/>Paper plugin integration fixture<br/>[TestPlugin.java]"]
  node_github_ci["GitHub Actions<br/>CI workflow<br/>[gradle.yml]"]
  node_jenkins["Jenkins<br/>CI pipeline"]
end

node_upstream_update -->|"uses"| node_dev_imports
node_upstream_update -->|"updates/applies"| node_minecraft_patches
node_upstream_update -->|"updates/applies"| node_paper_patches
node_upstream_update -->|"updates/applies"| node_purpur_patches
node_upstream_update -->|"updates/applies"| node_api_patches
node_gradle -->|"builds"| node_patched_server
node_minecraft_patches -->|"customizes"| node_patched_server
node_paper_patches -->|"customizes"| node_patched_server
node_purpur_patches -->|"adds"| node_patched_server
node_api_patches -->|"extends API"| node_patched_server
node_branding_options -->|"runs in"| node_patched_server
node_commands -->|"reloads"| node_configuration
node_configuration -->|"configures behavior"| node_patched_server
node_tick_coordination -->|"coordinates ticks"| node_patched_server
node_simd_detection -->|"selects path"| node_vector_palette
node_vector_palette -->|"extends API"| node_patched_server
node_test_plugin -.->|"integration-tests"| node_patched_server
node_github_ci -->|"runs"| node_gradle
node_jenkins -->|"runs"| node_gradle

click node_gradle "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/build.gradle.kts"
click node_upstream_update "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/scripts/updateUpstream.sh"
click node_dev_imports "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/build-data/dev-imports.txt"
click node_minecraft_patches "https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/minecraft-patches/features"
click node_paper_patches "https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/paper-patches/features"
click node_purpur_patches "https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/purpur-patches/features"
click node_api_patches "https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-api/paper-patches/features"
click node_branding_options "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/Options.java"
click node_commands "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/command/PlazmaCommands.java"
click node_configuration "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/configuration/PlazmaConfigurations.java"
click node_tick_coordination "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/util/TickingController.java"
click node_simd_detection "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-api/src/main/java/org/plazmamc/plazma/simd/SIMDDetection.java"
click node_vector_palette "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-api/src/main/java/org/plazmamc/plazma/simd/VectorMapPalette.java"
click node_test_plugin "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/test-plugin/src/main/java/org/plazmamc/testplugin/TestPlugin.java"
click node_github_ci "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/.github/workflows/gradle.yml"
click node_jenkins "https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/Jenkinsfile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gradle,node_upstream_update,node_dev_imports,node_minecraft_patches,node_paper_patches,node_purpur_patches,node_api_patches,node_patched_server toneBlue
class node_branding_options,node_commands,node_configuration,node_tick_coordination toneAmber
class node_simd_detection,node_vector_palette toneMint
class node_test_plugin,node_github_ci,node_jenkins toneRose
```

## Components

### Build & patch pipeline

Gradle assembles the patched distribution from ordered upstream patch series.

- [Gradle build](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/build.gradle.kts): build entry point · `build.gradle.kts`
- [Upstream update scripts](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/scripts/updateUpstream.sh): patch tooling · Updates and applies upstream-derived source state. · `scripts/updateUpstream.sh`
- [Development imports](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/build-data/dev-imports.txt): source manifest · `build-data/dev-imports.txt`
- [Minecraft feature patches](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/minecraft-patches/features): ordered patch series · Includes core runtime performance and concurrency changes. · `plazma-server/minecraft-patches/features`
- [Paper server patches](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/paper-patches/features): ordered patch series · `plazma-server/paper-patches/features`
- [Purpur additions](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-server/purpur-patches/features): ordered patch series · `plazma-server/purpur-patches/features`
- [Paper API patches](https://github.com/plazmamc/plazmabukkit/tree/ver/1.21.8/plazma-api/paper-patches/features): ordered patch series · `plazma-api/paper-patches/features`
- **Patched server distribution**: JVM server artifact · Plugin-compatible Minecraft server/API deliverable.

### Server runtime

Plazma-owned runtime code extends the patched Minecraft server.

- [Branding & options](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/Options.java): runtime bootstrap · Defines Plazma identity and command-line options. · `plazma-server/src/main/java/org/plazmamc/plazma/Options.java`
- [Server commands](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/command/PlazmaCommands.java): command router · Routes Plazma reload and version commands. · `plazma-server/src/main/java/org/plazmamc/plazma/command/PlazmaCommands.java`
- [Configuration boundary](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/configuration/PlazmaConfigurations.java): global and world config · Loads Plazma settings separately from upstream patch logic. · `plazma-server/src/main/java/org/plazmamc/plazma/configuration/PlazmaConfigurations.java`
- [Tick coordination](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-server/src/main/java/org/plazmamc/plazma/util/TickingController.java): concurrency utilities · Async execution and tick control affect the Minecraft tick lifecycle. · `plazma-server/src/main/java/org/plazmamc/plazma/util/TickingController.java`

### API capability

API-level extensions isolate SIMD selection from gameplay code.

- [SIMD capability detection](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-api/src/main/java/org/plazmamc/plazma/simd/SIMDDetection.java): hardware capability · Selects vector or fallback map-palette processing. · `plazma-api/src/main/java/org/plazmamc/plazma/simd/SIMDDetection.java`
- [Vector map palette](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/plazma-api/src/main/java/org/plazmamc/plazma/simd/VectorMapPalette.java): API optimization · `plazma-api/src/main/java/org/plazmamc/plazma/simd/VectorMapPalette.java`

### Validation & delivery

Integration fixture and CI validate distributable server builds.

- [Test plugin fixture](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/test-plugin/src/main/java/org/plazmamc/testplugin/TestPlugin.java): Paper plugin integration fixture · Exercises server plugin lifecycle integration. · `test-plugin/src/main/java/org/plazmamc/testplugin/TestPlugin.java`
- [GitHub Actions](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/.github/workflows/gradle.yml): CI workflow · `.github/workflows/gradle.yml`
- [Jenkins](https://github.com/plazmamc/plazmabukkit/blob/ver/1.21.8/Jenkinsfile): CI pipeline · `Jenkinsfile`

## Connections

- Upstream update scripts → Development imports: uses
- Upstream update scripts → Minecraft feature patches: updates/applies
- Upstream update scripts → Paper server patches: updates/applies
- Upstream update scripts → Purpur additions: updates/applies
- Upstream update scripts → Paper API patches: updates/applies
- Gradle build → Patched server distribution: builds
- Minecraft feature patches → Patched server distribution: customizes
- Paper server patches → Patched server distribution: customizes
- Purpur additions → Patched server distribution: adds
- Paper API patches → Patched server distribution: extends API
- Branding & options → Patched server distribution: runs in
- Server commands → Configuration boundary: reloads
- Configuration boundary → Patched server distribution: configures behavior
- Tick coordination → Patched server distribution: coordinates ticks
- SIMD capability detection → Vector map palette: selects path
- Vector map palette → Patched server distribution: extends API
- Test plugin fixture → Patched server distribution: integration-tests
- GitHub Actions → Gradle build: runs
- Jenkins → Gradle build: runs
