Documentation

Queues

Premium

This is part of ScriptedEssentials Premium. See what's in each edition.

Queues let players wait their turn by clicking an NPC. Once you open the queue, it sends the next player to the spawn point you've set. Use one for an arena entrance, a stage or anywhere the cast needs to enter in order.

Creating and managing queues requires scriptedessentials.admin. Queues are saved in npcs/queues.json.

Making one

commands
/queue create <name> <playername>    # spawns the mannequin where you stand
/queue setspawn <name>               # where people go when they get in
/queue open <name>

The mannequin is an NPC with the skin of whoever you name. It's protected, immortal, can't be pushed, watches players, and doesn't show in tab. Instead of a normal nametag it has its name floating above with a 3 queued counter under it that updates live.

Joining

Players right-click the mannequin to join. Their position shows on the action bar and updates as the line moves. Sneak and right-click to leave.

Once the queue is open and has a spawn point, the front of the line gets let in at the configured interval, three seconds by default: teleported to the spawn point with a welcome message. Close it and the line just waits.

commands
/queue close <name>
/queue open <name> false     # same thing

Commands on join and entry

commands
/queue joincmd <name> <command>       # runs when someone joins the line
/queue entercmd <name> <command>      # runs when someone gets let in
/queue joincmd <name> clear

They run from console. %player% is the player's name. You can add several, they run in order.

commands
/queue entercmd stage give %player% diamond_sword
/queue entercmd stage effect give %player% glowing 30

The mannequin

commands
/queue rename <name> <shownname>       # &-colour codes work
/queue setskin <name> <playername>

Names are 16 characters including the colour codes, that's a Minecraft limit. &c&lBob uses seven, including the formatting codes.

Spawn point elsewhere

commands
/queue setspawn <name> <world> <x> <y> <z> [yaw pitch]

For a spawn point in another world, or one you don't want to walk to.

The rest

commands
/queue info <name>       # everything about it
/queue list
/queue remove <name>     # deletes the queue and the mannequin

The old flat commands still work: /createq, /openq, /setqspawnpoint, /removeq, /listq.

Config

yaml
queue:
  # Seconds between letting the next person in
  admit-seconds: 3
  # Height of the floating counter above the mannequin's feet
  counter-height: 2.05
  # Gap between the counter and the name above it
  name-gap: 0.32