-
Notifications
You must be signed in to change notification settings - Fork 0
Persistence
wjddusrb03 edited this page Mar 29, 2026
·
1 revision
DisplayAPI can save displays to YAML so they survive server restarts.
DisplayAPI.text(location)
.text(Component.text("I survive restarts!"))
.persistent(true)
.id("my-permanent-hologram")
.spawn();- Displays marked with
.persistent(true)are tracked byPersistenceManager - On server shutdown or
/dapi save, all persistent displays are saved toplugins/DisplayAPI/displays.yml - On server startup, persistent displays are automatically restored
- Auto-save runs periodically (configurable in
config.yml)
The following properties are persisted:
- Location (world, x, y, z)
- Display type (text, block, item)
- ID
- Billboard mode
- Scale and translation
- Glow color and glowing state
- Brightness
- Shadow radius and strength
- Text content (serialized via GsonComponentSerializer)
- Text opacity, shadow, see-through, alignment
- Background color
- Block type (Material)
- Item type (Material)
- Per-player visibility (viewers list)
- Animations
- Interactive click handlers
- Follow targets
# plugins/DisplayAPI/config.yml
auto-save-interval: 6000 # Ticks (6000 = 5 minutes)/dapi save # Manual save
/dapi list # Shows [P] for persistent displays
/dapi remove id # Removes and deletes from save file
- Always set a meaningful
.id()for persistent displays so you can find them later - Use
.persistent(true)only for permanent fixtures (signs, holograms), not temporary effects - Animations must be re-applied after server restart (they are not saved)