- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: Easy Sidebar


By Fortifier42
Created: 2015/10/18 19:06:37 UTC-07:00 (8 years and 199 days ago)
Edited: 2019/03/01 02:17:48 UTC-08:00 (5 years and 65 days ago)
Likes: 0

Staff pick as of: 2015/10/18 19:08:34 UTC-07:00 (8 years and 199 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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
5500

## 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