Content generated with AI — it may contain mistakes.

Holograms

Pages

Holograms with several pages: each player reads their own, turned by a click or on a timer, with click actions per page.

A hologram can have several pages. Every player sees one page at a time, and each player's page is their own: turning it for one player turns it for nobody else.

lines is page 1, so a hologram written before pages existed is unchanged. pages adds the pages after it, each with its own lines and click.

plugins/ExyliaDisplays/holograms.yml
holograms:
  rules:
    lines:
      - '<head:Notch><size:0.8>'
      - '{primary}&lWELCOME'
      - '{warning}➥ Click for the rules'
    pages:
      - lines:
          - '{primary}&lRULES'
          - '{letters}No griefing, no cheating.'
        click: ['left: [PAGE] previous', 'right: [PAGE] 1']
    page-interval: 200          # ticks; each player's page turns on its own. 0 never
    click:
      commands: ['[PAGE] next']

Turning the page

LineTurns the clicking player's page to
[PAGE] next (or [PAGE])The next page.
[PAGE] previous (prev, back)The previous page.
[PAGE] first / [PAGE] lastThe first / last page.
[PAGE] 2Page 2. A number past the end goes to the last page.

[PAGE] only exists in a hologram's click lines; it means nothing on an NPC. Anything else after it is reported once in the console.

page-interval turns each player's page on its own every that many ticks (20 ticks = one second). 0, the default, never turns it. A click that turns the page restarts that player's timer.

Click actions per page

click.commands runs while a player is on page 1; a page's own click runs while they are on that page. The same box can do different things on each page. The click box's width, cooldown and hover-scale are shared by every page.

Editing pages in game

On the lines screen, the book shows PAGE [current/total]:

ClickDoes
Left / rightNext / previous page (it wraps around).
Shift-leftAdds an empty page at the end and opens it.
Shift-rightThis page's click actions. On page 1 they are the hologram's own.
QRemoves this page and its lines, after asking.

Every line button edits the page on screen.

From commands

/holo rules page add
/holo rules page 2                     # opens page 2 and turns the hologram to it for you
/holo rules page 2 addline {letters}A line on page 2
/holo rules page 2 setline 1 {primary}&lRULES
/holo rules page 2 line 1 size 1.6
/holo rules page remove 2
/holo rules pageinterval 200

Every line command (addline, setline, insertline, removeline, moveline, line) takes page <n> in front to work on another page; without it, it works on page 1.

Removing page 1 makes page 2 the first, and its click actions become the hologram's click.commands. The last page cannot be removed.

When a hologram's lines change while players are reading it, each one stays on the page they were on.

Something missing on this page? Tell us on Discord