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 184 commands...
NameSidebar
Syntaxsidebar (add/remove/{set}/set_line) (title:<title>) (scores:<#>|...) (values:<line>|...) (start:<#>/{num_of_lines}) (increment:<#>/{-1}) (players:<player>|...) (per_player)
Short DescriptionControls clientside-only sidebars.
Full DescriptionThis command was created as a simpler replacement for using the Scoreboard command to display per-player sidebars.
By using packets and dummies, it enables you to have non-flickering, fully functional sidebars,
without wasting processing speed and memory on creating new Scoreboards for every single player.

Using this command, you can add, remove, or set lines on the scoreboard.

To set the title of the sidebar, use the 'title:' parameter in any case where the action is 'set'.

By default, the score numbers descend from the total line count to 1.
To customize the automatic score values, use the 'start:' and 'increment:' arguments in any case where the action is 'set'.
'Start' is the score where the first line will be shown with. The default 'start' value is determined by how many items are specified in 'values:'.
'Increment' is the difference between each score and the default is -1.

To instead set entirely custom numbers, use the 'scores:' input with a list of numbers,
where each number is the score to use with the value at the same place in the 'values:' list.

You can remove by line value text, or by score number.

The per_player argument is also available, and helps to reduce the number of loops required for updating multiple players' sidebars.
When it is specified, all tags in the command will fill based on each individual player in the players list.
So, for example, you could have <player.name> on a line and it will show each player specified their name on that line.
Related Tags<PlayerTag.sidebar_lines> Returns the current lines set on the player's Sidebar via Command:sidebar.
<PlayerTag.sidebar_title> Returns the current title set on the player's Sidebar via Command:sidebar.
<PlayerTag.sidebar_scores> Returns the current scores set on the player's Sidebar via Command:sidebar, (...)
Usage Example
# Use to show all online players a sidebar.
- sidebar set "title:Hello World!" "values:This is|My Message!|Wee!" players:<server.online_players>
Usage Example
# Use to show a few players their ping.
- sidebar set title:Info "values:Ping<&co> <player.ping>" players:<[someplayer]>|<[player]>|<[aplayer]> per_player
Usage Example
# Use to set a sidebar with the score values indicating information to the user.
- sidebar set scores:<server.online_players.size>|<server.max_players> "values:Players online|Players allowed"
Usage Example
# Use to change a specific line of a sidebar.
- sidebar set_line scores:5 "values:Better message!"
Usage Example
# Use to add a line to the bottom of the sidebar.
- sidebar add "values:This is the bottom!"
Usage Example
# Use to remove multiple lines from the sidebar.
- sidebar remove scores:2|4|6
Usage Example
# Use to stop showing the sidebar.
- sidebar remove
Groupplayer
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/SidebarCommand.java#L37