Skip to content
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

Add simple scoreboard API #2181

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Conversation

PetteriM1
Copy link
Collaborator

Implemented a simple API to create scoreboards. Managing the scoreboards is fully left to plugin developers.

Usage:

  • Create a new scoreboard new Scoreboard(String title, SortOrder, DisplaySlot).
  • Show it to player scoreboard.showTo(Player).
  • Add/modify scores scoreboard.setScore(String scorer, int score).
  • Remove scores scoreboard.removeScore(String scorer) or scoreboard.clear().
  • And hide it at the latest when player quits scoreboard.hideFor(Player).
  • Non duplicate modifications to scores send updates to viewers automatically. This can be paused temporarily for efficient bulk modifications using holdUpdates() and unholdUpdates().

@PetteriM1 PetteriM1 merged commit 9735a92 into CloudburstMC:master Jun 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant