DriftHolograms
Text, item and block holograms, edited in game.
Holograms for Paper and Folia 26.3. Text, item and block holograms made from display entities, changed in game
with one /hologram edit command, with PlaceholderAPI text that every player sees for themselves. Holograms can
follow a DriftNPCs NPC, and holograms from DecentHolograms or FancyHolograms can be imported. Part of DriftSuite.
Features
- Three kinds: text holograms (MiniMessage, any number of lines), item holograms (any item, custom items too) and block holograms. Each is a single display entity, so there are no armour stands and nothing to click by accident.
- Never saved with the world: the entities aren't stored in chunks. Each hologram is its own file in
holograms/and is put back whenever its chunk loads, so a crash can't leave copies behind. - Everything in game:
/hologram edit <name> <option>moves, turns, scales, colours and relights a hologram, and changes its lines, item or block. Tab-complete only offers options that fit the hologram. - Per-player placeholders: a text hologram with
%placeholders%gets one entity per nearby player, made with that player's text and shown only to them, and worked out again everyupdateTextInterval. - Who sees it: everyone, only players with
driftholograms.view.<name>, or only players another plugin (oredit <name> viewer) shows it to. How far away it shows is set per hologram. - NPC link:
linkWithNpcmakes a hologram float above a DriftNPCs NPC and follow it. - Importers:
/driftholograms import decentholograms|fancyhologramscopies holograms over without touching the other plugin's files. - List menu:
/hologram listis a paged menu: click to go there, right-click for every setting. - Folia: every entity is made, changed and removed on the thread that owns it.
Requirements
- Paper or Folia 26.3 (Java 25)
- Optional: PlaceholderAPI (per-player text), DriftNPCs (NPC links)
Getting started
- Put
DriftHolograms-<version>.jarinplugins/and start the server. It works without any changes: its files are written toplugins/DriftHolograms/(see Folder layout). - Stand where you want it and type
/hologram create text welcome, then change its lines with/hologram edit welcome setLine 1 <text>(Tab afteredit welcomeshows every option). /hologram listshows every hologram;/hologram info <name>shows its settings, with each line clickable.
Commands
| Command | What it does |
|---|---|
/hologram (alias /holo) help | The command list |
/hologram create <text|item|block> <name> | A new hologram where you stand. Item uses the item in your hand, block the block in your hand (grass otherwise) |
/hologram remove <name> | Delete a hologram and its file |
/hologram copy <name> <new name> | Copy a hologram to where you stand |
/hologram list [page] | Every hologram (a menu for players, chat for the console) |
/hologram nearby [range] | Holograms around you, closest first (30 blocks if no range) |
/hologram info <name> | Every setting and each line (click a line to change it) |
/hologram teleport <name> | Go to a hologram |
/hologram edit <name> <option> [values] | Change a hologram (see below) |
/driftholograms import <decentholograms|fancyholograms> | Copy holograms from another plugin |
/driftholograms save | Write changed holograms to their files (with save-on-change off) |
/driftholograms reload | Reload every file and the holograms, and say how many problems it found |
/driftholograms version | Show the version |
/driftholograms help | The staff commands |
Names are letters, numbers, - and _, up to 32 long. Command names and aliases can be changed in
commands.yml.
Edit options
/hologram edit <name> <option> .... Upper or lower case doesn't matter.
| Option | For | Values |
|---|---|---|
position / moveHere | all | moves it to where you stand |
center | all | centres it on the block it's in |
moveTo | all | <x> <y> <z> [yaw] [pitch] (~ and ~2 work like /tp) |
rotate | all | <yaw> |
rotatepitch | all | <pitch> (-90 to 90) |
translate | all | <x> <y> <z> offset from its spot |
scale | all | <size> or <x> <y> <z> (more than 0, up to 100) |
billboard | all | center, fixed, vertical or horizontal |
shadowRadius / shadowStrength | all | a number |
brightness | all | block <0-15>, sky <0-15> or reset |
visibilityDistance | all | blocks, or default |
visibility | all | all, manual or permission_needed |
viewer | all | add <player> / remove <player> for manual holograms (until they log out) |
linkWithNpc / unlinkWithNpc | all | <npc> |
setLine | text | <line> <text> (one past the last line adds one) |
addLine | text | <text> |
removeLine | text | <line> |
insertBefore / insertAfter | text | <line> <text> |
background | text | default, transparent, #RRGGBB, #AARRGGBB or a colour name |
textShadow / seeThrough | text | true or false |
textAlignment | text | center, left or right |
updateTextInterval | text | ticks, 5s, 5m or never |
item | item | the item in your hand |
block | block | <block> (or the block in your hand) |
Permissions
| Permission | Default | What it allows |
|---|---|---|
driftholograms.admin | op | /hologram and /driftholograms |
driftholograms.view.<name> | op | See a hologram set to visibility permission_needed |
Turning features on and off
At the top of config.yml:
| Switch | What it does |
|---|---|
list-menu | /hologram list opens a menu for players. Off lists in chat |
placeholders | %placeholders% are worked out for each player (needs PlaceholderAPI) |
npc-link | Linked holograms float above their DriftNPCs NPC |
importers | /driftholograms import |
Settings
| Setting | Default | What it does |
|---|---|---|
save-on-change | true | Write a hologram's file as soon as it changes. Off waits for /driftholograms save, a reload or the server stopping |
default-visibility-distance | 48 | How far away holograms show, unless they have their own |
max-visibility-distance | 256 | The furthest visibilityDistance can be set |
check-ticks | 20 | How often each hologram is checked (puts it back after its chunk loads) |
line-width | 200 | How wide a line gets before Minecraft wraps it, in pixels |
nearby-max-range | 500 | The biggest range for /hologram nearby |
default-text | two lines | What a new text hologram says |
default-update-interval | 5s | The updateTextInterval new text holograms get |
max-lines | 50 | The most lines a text hologram can have |
npc-link.offset | 0.3 | How far above the NPC's head a linked hologram floats |
npc-link.default-height | 1.8 | How tall an NPC is when DriftNPCs doesn't say |
Display entities are only sent as far as the server's entity tracking range for displays (Paper/Spigot config), so a hologram never shows further than that, whatever its distance says.
Can't be exploited
DriftHolograms doesn't move items or money, and holograms can't be clicked or picked up. What it guards against:
- No leftover entities: holograms are never saved into chunks, and any marked display entity that does turn up in a loading chunk is removed.
- No doubles: each hologram's entities are swapped under a lock with a counter, so a check that was already running when the hologram was edited throws away what it made instead of leaving a second copy.
- Safe files: each file is written to a temporary file and then moved into place, one write at a time, so a crash mid-save can't leave half a file. Reload waits for writes and deletes that are still going.
- Per-player text stays private: a player's own entity is hidden from everyone else.
- Imports are read-only: the other plugin's files are never changed, and names that already exist are skipped.
Placeholders
DriftHolograms doesn't add PlaceholderAPI placeholders of its own; it shows any PlaceholderAPI placeholder in a text hologram, worked out for each player who sees it.
For other plugins
com.itskoazt.driftholograms.api.DriftHologramsAPI (static, any thread, plain types so reflection works):
exists, names, location, type, createText, createItem, createBlock, remove, setLines, lines,
setItem, setBlock, move, setVisibility, show, hide and linkNpc. Holograms made with save false are
temporary: never written to a file and left alone by reload.
NPC links call com.itskoazt.driftnpcs.api.DriftNPCsAPI.location(String) and, if it's there, height(String)
from DriftNPCs, found by name, so DriftHolograms runs without DriftNPCs.
Configuration files
config.yml: feature switches and settingscommands.yml: command names, aliases, permissions, or turn a command offmessages.yml: every message (MiniMessage), the prefix andprefix-enabledmenus.yml: the list menuholograms/<name>.yml: one file per hologram
Every file starts with a boxed header saying how to apply changes, is split into sections, and has a note above every option saying what it does, its unit and the values it takes.
When you update, new options are added with their notes and everything you changed is kept. When the notes
themselves change, config.yml, commands.yml, messages.yml and menus.yml are rebuilt once with the new notes
and your values written back in; the old file is kept in data/backups/. Messages you never changed get the new
default wording. Hologram files are never rewritten by an update.
Mistakes in the files
A value DriftHolograms can't use never stops the plugin. The console says which file and option, what was wrong and what is used instead, for example:
holograms/spawn.yml: billboard "sideways" isn't one of CENTER, FIXED, VERTICAL, HORIZONTAL, using "CENTER"
/driftholograms reload tells you how many problems it found, so you know to look.
Folder layout
plugins/DriftHolograms/
config.yml settings, starting with the features: switches
messages.yml every message
menus.yml every menu
commands.yml command names, aliases and permissions
holograms/ one file per hologram, named after it
data/ the plugin's own files, no need to open them
backups/ old copies of files DriftHolograms replaced
*.version which version of each file you have
Older versions kept the version markers (.messages.yml.version, .menus.yml.version) and old message backups next
to config.yml. They are moved into data/ the first time the new version starts (one console line per file), and
nothing is overwritten or deleted. DriftHolograms has no database: everything about a hologram is in its file.