Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 179 commands...
NameAreaDisplay
Syntaxareadisplay ({auto}/create/update/remove) [<id>|...] (area:<area>) (players:<player>|...) (duration:<duration>) (particle:<particle>) (special_data:<map>) (density:<#>) (interval:<duration>) (range:<#.#>) (max_particles:<#>) (grid:<true/false>)
Short DescriptionOutlines an area with particles for players to see.
Full DescriptionOutlines an area object (a CuboidTag, EllipsoidTag or PolygonTag) with particles, repeatedly, for as long as the display is around.

You can CREATE a new display, UPDATE an existing one, or REMOVE existing ones.
The default 'auto' will either 'create' or 'update' depending on whether it already exists.

Requires an ID. 'remove' also accepts a list of IDs.

'create' requires an area. The area is snapshotted when given:
changing a noted area afterwards does not change the display until you 'update' it with the area again.
A cuboid is drawn as the twelve edges of each of its member boxes, covering the full blocks at both corners.
A polygon is drawn as its top and bottom outlines, plus a vertical line at each corner.
An ellipsoid is drawn as three ellipses through its center, one on each axis plane.
Any other area type is drawn as the outline of its cuboid boundary.

Optionally, specify a list of players to show the display to.
If unspecified when creating a display, it is shown to every player on the server, including any player
that joins while it is still around.
Viewers are recorded by UUID, so a viewer that relogs keeps seeing the display.
Specifying players when updating a display replaces its viewers with the given players.
Using 'remove' with a 'players' list removes those players from the viewers instead of removing the display.
Note that doing so on a server-wide display narrows the display down to the players that are online at that moment,
so it stops following new joins.

Optionally, specify a duration, after which the display removes itself. If unspecified, the display stays until removed.
Specifying a duration when updating a display restarts its countdown. A duration of 0 makes the display permanent.

Optionally, specify the particle to draw with. Defaults to 'flame', which fades quickly enough that successive redraws do not pile up.
Particles that need extra data take it through 'special_data', in the same map format as Command:PlayEffect.
If the particle is changed while updating without giving new special_data, the previous special_data carries over to the new particle, so it must suit that particle as well.
It is dropped instead if the new particle takes no special_data.

Optionally, specify the density, which is the number of particles per block along each line, from 1 to 5. Defaults to 3.

Optionally, specify the interval between redraws. Defaults to 12 ticks.

Optionally, specify the range, in blocks: a viewer is only sent the particles within this distance of them. Defaults to 32.
Vanilla clients do not render ordinary particles further than 32 blocks away, so for a range above 32 the particles are forced,
which also makes clients render them regardless of their particle settings.

Optionally, specify the maximum number of particles a viewer is sent per redraw. Defaults to 1000.
When more points than that are in range, the ones nearest to the viewer are sent and the rest are skipped for that redraw.

Each redraw is spread out over its interval, up to 1 second, rather than sent all at once: every tick sends an even share of the particles,
interleaved so each share covers the whole display. A redraw is skipped if the previous one is still being picked. Picking and sending the particles happens off the main thread.

Optionally, specify 'grid:true' to additionally draw a grid on the surface of the area.
The grid gets sparser as the surface gets bigger: its lines are spaced one block apart, plus one more block for every 256 square blocks
of the surface they are on, up to 30 blocks apart. Each pair of opposite faces of a cuboid is spaced separately;
the side faces of a polygon share the spacing of the widest one, so the horizontal lines meet all the way around.
An ellipsoid's grid consists of horizontal rings and meridians, spaced by the biggest face of its bounding box.
Grid lines are drawn with at most 2 particles per block, however high the density is.
Use 'grid:false' when updating to hide the grid again.

A single display may not consist of more than 200,000 particles. Lower the density or disable the grid for very large areas.

Displays are only kept in memory: they are all gone after a server restart. Reloading scripts does not affect them.
Related Tags<server.area_displays> Returns a list of all current area display IDs from Command:areadisplay.
<server.area_display[<id>]> Returns the details of the given area display ID from Command:areadisplay, as a map with keys: (...)
<PlayerTag.area_display_ids> Returns a list of all area displays from Command:areadisplay that are shown to this player, (...)
Usage Example
# Outlines a cuboid for every player on the server for 30 seconds.
- areadisplay my_arena area:<cuboid[my_arena]> duration:30s
Usage Example
# Outlines a polygon in red dust for the linked player alone, with a grid.
- areadisplay claim_preview area:<[claim]> players:<player> particle:dust special_data:[size=1;color=red] grid:true
Usage Example
# Hides the grid of an existing display.
- areadisplay update claim_preview grid:false
Usage Example
# Stops showing a display to one player.
- areadisplay remove my_arena players:<[player]>
Usage Example
# Removes several displays at once.
- areadisplay remove my_arena|claim_preview
Groupworld
Sourcehttps://github.com/MINEZ/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/AreaDisplayCommand.java#L39