-
-
Notifications
You must be signed in to change notification settings - Fork 2
Server_Bossbar
Legopitstop edited this page May 28, 2021
·
2 revisions
This datapack adds in a boss bar that is used on most/all servers if you want a vanilla-like server or you don't like plugins install this simple datapack to get a cool look to your server. It could even be in a single-player world!
- Config to customize your experience.
- Easy to use API
- Works out-of-box (it's recommended to customize to your use.)
You can edit the bossbar via the API, The file can be found: <datapack>/data/custom/functions/bossbar.mcfunction
Example in JSON: (This is not the proper format, just JSON looks nicer)
Default File (in proper format)
# Parent: Apply properties to all frames With optional override capeability.
data modify storage bossbar:api parent set value {display_time: 20, value: "auto", style: "notched_10"}
# Bossbar: Contains all the frames (up to 64!)
data modify storage bossbar:api bossbar insert 0 value {display_name: '{"text":"Welcome!","color":"dark_blue"}', color: "blue"}
data modify storage bossbar:api bossbar insert 1 value {display_name: '{"text":"Welcome!","color":"dark_blue"}', color: "blue"}
data modify storage bossbar:api bossbar insert 2 value {display_name: '{"text":"legopitstop.weebly.com","color":"dark_green"}', color: "green"}
data modify storage bossbar:api bossbar insert 3 value {display_name: '{"text":"legopitstop.weebly.com","color":"dark_green"}', color: "green"}
data modify storage bossbar:api bossbar insert 4 value {display_name: '{"text":"custom bossbar","color":"red"}', color: "pink"}
data modify storage bossbar:api bossbar insert 5 value {display_name: '{"text":"custom bossbar","color":"red"}', color: "pink"}
data modify storage bossbar:api bossbar insert 6 value {display_name: '{"text":"Is this cool or what?","color":"dark_purple"}', color: "purple"}
data modify storage bossbar:api bossbar insert 7 value {display_name: '{"text":"Is this cool or what?","color":"dark_purple"}', color: "purple"}
data modify storage bossbar:api bossbar insert 8 value {display_name: '{"text":"Easy to learn API!","color":"dark_red"}', color: "red"}
data modify storage bossbar:api bossbar insert 9 value {display_name: '{"text":"Easy to learn API!","color":"dark_red"}', color: "red"}
data modify storage bossbar:api bossbar insert 10 value {display_name: '{"text":"Up to 64 custom frames!","color":"gray"}', color: "white"}
data modify storage bossbar:api bossbar insert 11 value {display_name: '{"text":"Up to 64 custom frames!","color":"gray"}', color: "white"}
data modify storage bossbar:api bossbar insert 12 value {display_name: '{"text":"Customizeable!","color":"gold"}', color: "yellow"}
data modify storage bossbar:api bossbar insert 13 value {display_name: '{"text":"Customizeable!","color":"gold"}', color: "yellow"}
data modify storage bossbar:api bossbar insert 14 value {display_name: '{"text":"Change the time between frames!","color":"dark_blue"}', display_time: 100, color: "blue"}
data modify storage bossbar:api bossbar insert 15 value {display_name: '{"text":"Change the time between frames!","color":"dark_blue"}', display_time: 100, color: "blue"}
data modify storage bossbar:api bossbar insert 16 value {display_name: '{"text":"Show the percent!","color":"dark_green"}', display_percent: true, color: "green"}
data modify storage bossbar:api bossbar insert 17 value {display_name: '{"text":"Show the percent!","color":"dark_green"}', display_percent: true, color: "green"}
data modify storage bossbar:api bossbar insert 18 value {display_name: '{"text":"Whats a parent?","color":"red"}', color: "pink"}
data modify storage bossbar:api bossbar insert 19 value {display_name: '{"text":"Whats a parent?","color":"red"}', color: "pink"}
Allowed strings for color
- blue
- green
- pink
- purple
- red
- white - default
- yellow
Allowed types for display_percent
- true - Will display the percent on the left.
- false - (default) Will not display the percent.
- left - Will display the percent on the left.
- right - Will display the percent on the right.
Allowed string for style
- progress - (default) Not notched
- notched_10 - 10 notches
- notched_12 - 12 notches
- notched_20 - 20 notches
- notched_6 - 6 notches
Allowed strings for value
- 0-100- (default: 0) The amount to fill the bossbar
- random - Will choose a random number from 0-100
- auto - Will choose the number depending on how many items you have (100 / totalFrames * currentFrame = value)