HyperScript
Docs

← All of the Docs The world

Display entities and particles

effectspawn text display <text> at <position>

Floating text that always faces the viewer

spawn text display "&6Welcome, %player.name%!" at player for 10 seconds
Try it
effectspawn block display <block> at <position>

A floating block that cannot be walked into or broken

spawn block display "diamond_block" at 0, 80, 0 in "world"
Try it
effectspawn particle <name> at <position>

One particle

spawn particle "flame" at player
Try it
expression... colored "<#rrggbb>"

Hex colour, for the "dust" particle

spawn particle "dust" colored "#ff8800" count 20 at player.x, player.y + 2, player.z
Try it
expression... count <n>

Number of particles (1 to 1000), spread slightly around the position

spawn particle "dust" colored "#ff8800" count 20 at player.x, player.y + 2, player.z
Try it
expression... for <n> seconds

Displays only: remove it after this long

make event entity glow for player for 10 seconds
Try it
expressionshow text <text> in front of <who>since 1.7.49

Text that floats in front of a player's face and follows where they look. Only that player sees it

show text "&6Welcome!%nl%&7Have a look around" in front of player
Try it
expressionshow text <text> in front of <who> for <duration>since 1.7.49

The same, gone after that long

show text "&aSaved." in front of player for 3 seconds
Try it
expressionshow text <text> in front of <who> until <condition>since 1.7.49

The same, gone as soon as the condition holds

show text "&7Sneak to close this" in front of player until player is sneaking
Try it
expressionshow text <text> in front of <who> while <condition>since 1.7.49

The same, gone as soon as the condition no longer holds

show text "&cYou are in the arena" in front of player while player is in region "arena"
Try it
expressionshow text <text> in front of <who> at distance <n>since 1.7.49

How many blocks in front of the eyes, from 0.5 to 16; 2.2 when it is not said. Goes before for, until or while

show text "&eLook here" in front of player at distance 4 for 5 seconds
Try it
expressionshow text <text> in front of <who> lockedsince 1.7.51

The same, fastened to the player: it keeps up with them as they walk and turn instead of gliding after them. Goes before for, until or while too

show text "&aSaved." in front of player locked for 3 seconds
Try it
effecthide text in front of <who>since 1.7.49

Take it away now

hide text in front of player
Try it
Guide and examples
spawn text display "&6Welcome, %player.name%!" at player for 10 seconds
spawn block display "diamond_block" at 0, 80, 0 in "world"
spawn particle "flame" at player
spawn particle "dust" colored "#ff8800" count 20 at player.x, player.y + 2, player.z
StatementEffect
spawn text display <text> at <position>Floating text that always faces the viewer
spawn block display <block> at <position>A floating block that cannot be walked into or broken
spawn particle <name> at <position>One particle
... colored "<#rrggbb>"Hex colour, for the "dust" particle
... count <n>Number of particles (1 to 1000), spread slightly around the position
... for <n> secondsDisplays only: remove it after this long
show text <text> in front of <who>Text that floats in front of a player's face and follows where they look. Only that player sees it
show text <text> in front of <who> for <duration>The same, gone after that long
show text <text> in front of <who> until <condition>The same, gone as soon as the condition holds
show text <text> in front of <who> while <condition>The same, gone as soon as the condition no longer holds
show text <text> in front of <who> at distance <n>How many blocks in front of the eyes, from 0.5 to 16; 2.2 when it is not said. Goes before for, until or while
show text <text> in front of <who> lockedThe same, fastened to the player: it keeps up with them as they walk and turn instead of gliding after them. Goes before for, until or while too
hide text in front of <who>Take it away now

A position is either at player or at <x>, <y>, <z>, optionally followed by in "<world>". Without a world, the player's world is used. at player places a display just above the player's head and a particle at body height.

Text in front of a player. show text ... in front of <who> puts text before one player's eyes. It moves with them and turns as they look around, nobody else sees it, and it goes when they leave the server.

command /tutorial:
    trigger:
        show text "&6Welcome!%nl%&7Open the chest in front of you" in front of player until player is sneaking
        wait 1 second
        send "&7Sneak to close the hint."

on player death:
    show text "&cYou died%nl%&7Respawning..." in front of victim for 3 seconds
  • Lines. %nl% in the text starts a new line; a list gives a line for each element: show text ["&6Shop", "&7Right-click to buy"] in front of player.
  • How long. Without anything more it stays until hide text in front of <who> or until the player leaves or dies. for 10 seconds gives it a time. until <condition> looks at the condition four times a second and takes the text away once it is true; while <condition> is the other way round. for and one of the two can be used together, and whichever comes first ends it.
  • The condition is read with what the trigger knew when the text was shown: its player and its {_local} variables, with the values they had at the end of the trigger.
  • Locked. Without it the text glides after the player, which looks soft and trails a little when they run. With locked it is put where the player is about to be, going on as they are going, and gets there within a tick: show text "&aSaved." in front of player locked for 3 seconds. It is as quick as a server can make it; what the player sees still depends on their connection.
  • A player has one such text at a time; showing another replaces it.
  • On Minecraft 1.19.4 and newer the text is a text display. Before that it is name tags, a line each. Showing it to one player only needs 1.18; on 1.16 and 1.17 everybody nearby sees it.

Numbers that float up. show floating text <text> at <position> puts text there that drifts up a block and is gone after a second or so (for 2 seconds to say how long). Everybody nearby sees it. It is how damage numbers are made:

on entity damage:
    show floating text "&c-%event.damage%" at victim

on block break:
    add 5 to {%player%.coins}
    show floating text "&6+5" at player

Each one is put a little to one side, so that several do not hide one another.

Pointing the way. point <who> to <location> draws a short trail of sparks from the player towards a place, which only they see and which moves as they do. It ends when they are within a few blocks of the place, when they change world, with stop pointing <who>, or with for, until or while as above.

command /quest:
    trigger:
        point player to {quest.chest} until {%player%.quest} is "done"
        send "&7Follow the sparks."

A glow one player sees. make <entity> glow for <who> gives a creature or a player the white outline that shows through walls, for that one player only; for 30 seconds gives it a time, and make <entity> stop glowing for <who> takes it away.

on entity click:
    make event entity glow for player for 10 seconds

This one talks to the game in a way the server has no official means for, so it needs a Paper server, version 1.20.5 or newer. Anywhere else it does nothing and says so once in the log. The outline is white; a colour of one's own is not possible this way.

  • Display entities need Minecraft 1.19.4 or newer. On older servers a text display becomes an invisible armour stand with a visible name, which looks almost the same. Block displays have no older equivalent; the statement logs a warning and does nothing.
  • A display without for ... seconds stays until the server restarts or the plugin is disabled. Displays are never written to the world file, so they cannot be left behind.
  • Particle names are the server's own, such as "flame", "heart", "cloud", "end_rod". Use "dust" for coloured particles; it works on every supported version.
  • Many particles were renamed in Minecraft 1.20.5 (villager_happy became happy_villager, spell_witch became witch, fireworks_spark became firework, and so on). Either name works on every version. /hyperscript particle lists the ones your server has, and /hyperscript particle flame shows one in front of you.
  • A particle that cannot be shown, because there is none of that name or it cannot be made, is said to the admins who are online as well as in the console, with the names that come close.
  • A position may also be written player's location, which means the same as player, or be a location held in a variable: at {%player%.home}.