Staff Pick: Easy Sidebar
By
Fortifier42Created: 2015/10/18 19:06:37 UTC-07:00 (9 years and 67 days ago)
Edited: 2019/03/01 02:17:48 UTC-08:00 (5 years and 298 days ago)
Likes: 0
Staff pick as of: 2015/10/18 19:08:34 UTC-07:00 (9 years and 67 days ago)
Denizen Version: 0.9.7
Script Version: 1
Description:
Easy Sidebar is a tool which allows you to easily add a scoreboard to your server.
Change the lines in the config and the update rate to adjust the sidebar to your server requirements, you can use colours and tags in the lines!
Download script |
View raw script## Change the lines below to change what is displayed on the sidebar! ##
## Change the update rate below to change how often the sidebar refreshes. ##
## Use the /sidebar command to toggle the sidebar on and off! ##
Easy_Sidebar_Config:
type: yaml data
debug: false
title: <&b><&l>Player Info
lines:
- "Ping: <player.ping>"
- "Location: <player.location.simple>"
- "Online Players: <server.list_online_players.size>/<server.max_players>"
update rate: 1s
Easy_Sidebar_Starter:
type: world
debug: false
events:
on server start:
- run "s@Easy_Sidebar_Loop" instantly
on player join:
- flag player Easy_Sidebar
Easy_Sidebar_Loop:
type: task
debug: false
script:
- if <server.get_online_players_flagged[Easy_Sidebar].is_empty.not> && <s@Easy_Sidebar_Config.yaml_key[lines].is_empty.not||false> {
- sidebar title:<parse:<s@Easy_Sidebar_Config.yaml_key[title]>> values:<parse:<s@Easy_Sidebar_Config.yaml_key[lines]>> players:<server.get_online_players_flagged[Easy_Sidebar]> per_player
}
- run <script> instantly "delay:<s@Easy_Sidebar_config.yaml_key[update rate].as_duration||1s>"
Easy_Sidebar_Command:
type: command
debug: false
name: sidebar
usage: /sidebar
description: Toggles your sidebar!
aliases:
- sb
script:
- if <player.has_flag[Easy_Sidebar]> {
- flag <player> Easy_Sidebar:!
- sidebar remove players:<player>
- narrate "<&6>Your sidebar has been <&b><&l>disabled<&9>!"
- queue clear
}
- flag <player> Easy_Sidebar
- narrate "<&6>Your sidebar has been <&b><&l>enabled<&9>!"
View History