Scoreboards - ShaneBeee/SkBee GitHub Wiki
SkBee includes some easy to use, non-flickering, packet based scoreboards. Because these scoreboards are packet based, they will not interfere anyway with vanilla Minecraft scoreboards or teams.
With some simples syntaxes, you can bring your server to life with a nice fancy scoreboard/sidebar.
Let's go over everything:
Expressions
Title
You can set the title of a scoreboard.
Syntaxes:
title of %players%'[s] [score]board[s]
title of [score]board of %players%
Example usage:
set title of player's scoreboard to "MyServer"
set title of all players' scoreboards to "Our Serberder!"
Lines
You can set or delete the lines of scoreboards.
Note: Line 15 is top line 1 is bottom.
Syntaxes:
line %number% of %players%'[s] [score]board[s]
line %number% of [score]board[s] of %player%
Examples:
set line 1 of player's scoreboard to "this is a line"
set line 3 of all players' scoreboards to "hey, more lines"
delete line 1 of player's scoreboard
delete line 15 of all players' scoreboards
Effects
Clear Board
You can clear entire scoreboards.
Note: Unlike some scoreboard addons, you do NOT need to clear/wipe the player's scoreboard each time you set lines.
This is only used if you happen to want to clear their board.
Syntaxes:
clear [score]board[s] of %players%
clear %players%'[s] [score]board[s]
Examples:
clear scoreboard of player
clear scoreboards of all players
Toggle Scoreboard
You can toggle a scoreboard on or off.
When toggled off, a player won't see their scoreboard.
This helps when you want to create a command for player's to toggle their board on or off without having to worry about wiping and all that.
Syntaxes:
toggle [score]board[s] of %players% [[to ](1¦(on|true)|2¦(off|false))]
toggle %players%'[s] [score]board[s] [[to ](1¦(on|true)|2¦(off|false))]
Examples:
toggle scoreboard of player on
toggle scoreboard of all players' off
Conditions
Scoreboard is on
Check if a player's scoreboard is currently toggled on or not.
Syntaxes:
[score]board of %player% is (on|true)
[score]board of %player% is(n't| not) on
[score]board of %player% is (off|false)
Examples:
if scoreboard of player is on:
toggle scoreboard of player off
Sample
Here is an example of a simple scoreboard.
Some things to keep in mind:
- Don't include things in the loop that don't ever change (ex: title, static messages) there's no need to update a line that never changes
- Include things in the loop that you want to update periodically (ie: points, variables, money, stats)
- Make sure to include a wait in your while loop, or your server will crash
on join:
# set things here that don't change (no need to include them in the loop)
set title of player's scoreboard to "&bLe &3Title"
set line 15 of player's scoreboard to "&aPlayers:"
set line 13 of player's scoreboard to "&aMoney:"
set line 11 of player's scoreboard to "&aKills:"
set line 9 of player's scoreboard to "&aDeaths:"
while player is online:
# set things here that need to update periodically
set line 14 of player's scoreboard to "&7 - &b%size of all players%"
set line 12 of player's scoreboard to "&7 - &b%balance of player%"
set line 10 of player's scoreboard to "&7 - &b%kill entity stat using player of player%"
set line 8 of player's scoreboard to "&7 - &b%deaths stat of player%"
wait 1 second