-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoreboard syntax. #6754
base: dev/feature
Are you sure you want to change the base?
Scoreboard syntax. #6754
Conversation
Would this allow us to create custom scoreboards like how it's done in SkBee? |
create scoreboards, yes |
This should also allow team's colors to be modified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some initial syntax-focused comments
it's in draft because it's not finished yet, there are still like 19 things missing |
I have no idea what any addons do or do not do, it's roughly aiming to emulate what's written in the Minecraft wiki here (as far as Bukkit allows me to). If there's something in particular you're asking about you'll need to describe it. |
Skbee has specific syntaxes for creating custom sidebar displays (set line 5 of scoreboard of player to "test") which uses fastboard(?) to do the scoreboard shenanigans. It's very different from using the actual minecraft scoreboard system. |
Ah I see. In that case, no. Scoreboards can be set to display the score of an entry in a place (e.g. the sidebar, the tab list, above the head) and then will display anything with a score for that objective. You can still (ab)use this to display lines of text: register a dummy objective, then give a fake offline player a score of (line number) for that objective. |
Additions
scoreboard
,team
,objective
andcriterion
types and their syntaxChanges
Syntax
Scoreboard
You can get or create scoreboards.
[the] [main|server] scoreboard [a] new scoreboard
These have teams.
These also have objectives (which can be selected by multiple criteria).
Teams
Sadly, teams are rubbish. Minecraft made them unimaginably badly.
I've gone to quite a lot of effort to get around that.
Teams support some changers by default (add X to team, reset team).
Teams have rules:
These are changed with an effect.
These are tested with a condition.
Note: the
only
flag is used for enforcing accuracy: "everybody can see X" implies "this team can see X" whereas "everybody can see X" does not imply "only this team can see X".Teams can have a prefix and suffix.
Teams have members!
In Minecraft, team entries are the (non-constant) names of players and the (non-constant) ids of entities, for some unfathomable reason.
To help those of us who don't appreciate this genius design, I added a backing wrapper set that references the team entries as
Entity
orOfflinePlayer
wherever possible. This means that when you doloop members of {team}:
you'll get the actual entities rather than a bunch of strings.This supports changers as well as possible.
Objectives
I haven't really looked at these yet, I hope they're not too difficult 😬
Criteria
Singular:
%criterion%
Plural:
%criteria%
Criteria are done a little weirdly internally, so we use #6718 for a literal.
We also have a String -> Criterion converter.
We also provide literals that the server declares from the default Minecraft objectives (e.g. dummy, death count, kill count) and these are generated when the server loads.
The suffix is used to prevent them interfering with other syntax.
Criteria have names (Minecraft's registration pattern) and their stringified version is their Skript pattern.
Todo
Related Issues: depends on #6728, closes #3332