Skip to content

Developer Notes.md

Alice Soraya edited this page Apr 30, 2026 · 1 revision

Developer Notes

Source Layout

include/
  plugin.h
  listener.h
  scorehud/
    score_tag.h
    scoreboard_view.h
    session_manager.h
    settings.h
    tag_resolver.h
src/
  plugin.cpp
  listener.cpp
  scorehud/
    score_tag.cpp
    scoreboard_view.cpp
    session_manager.cpp
    settings.cpp
    tag_resolver.cpp

Responsibilities

Component Responsibility
ScoreHudPlugin Endstone lifecycle, command registration, scheduled tasks
ScoreHudListener Endstone event handling
ScoreHudSettings Config file creation and parsing
SessionManager Per-player scoreboard lifecycle and toggles
ScoreboardView Endstone scoreboard rendering
TagResolver Built-in and custom tag resolution
ScoreTag Tag name/content model

Build

cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build

Linux must use Clang because Endstone requires Clang on Linux.

CC=clang CXX=clang++ cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build

Adding a Built-In Tag

  1. Add the tag value in TagResolver::refreshServerTags, TagResolver::refreshPlayerTags, or TagResolver::builtInTag.
  2. Add the tag to docs/wiki/Tags.md.
  3. Build the plugin.

Config Parser

The config parser is intentionally small and supports the YAML shape generated by ScoreHud. It is not a general-purpose YAML parser.

Keep config additions simple:

  • scalar values
  • flat string lists
  • existing nested sections

Use a real YAML library only if the config format becomes more complex.

Clone this wiki locally