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

Added option to use the main scoreboard for the scoreboard healthbar #20

Merged
merged 1 commit into from
May 12, 2020

Conversation

tajobe
Copy link
Member

@tajobe tajobe commented May 10, 2020

Relates to discussion in #19

The main caveat with using the main scoreboard (and the reason I chose to not make it default) is that the main scoreboard is assigned to players by default so the health will always show, rather than for 5s after taking damage (assuming there isn't already an objective in that slot).

@tajobe tajobe added the enhancement New feature or request label May 10, 2020
@tajobe tajobe requested a review from Puremin0rez May 10, 2020 21:19
@tajobe tajobe mentioned this pull request May 10, 2020
@Puremin0rez
Copy link
Member

Scoreboard API in general is a massive hack, which is the same issue I ran into with my own code over at https://github.com/Puremin0rez/Dethemium/pull/22 and was discussed

"Main" scoreboard is good for compatibility because it interacts directly with the vanilla scoreboard, meaning you will always have your scoreboard active even if another plugin is creating their own scoreboard layered on top of it. Assuming they are not messing with your objectives or display slots, "main" is a good compatibility choice. "new" scoreboards are the correct thing to do in a vacuum as you don't want to be dealing with vanilla scoreboards directly really, but in reality when you have multiple scoreboard plugins you're going to hit a wall with that since there can only really be a single "new" scoreboard at a time.

Default off is the correct choice, since a new scoreboard is the correct behavior by default IMO. It should only be switched for compatibility reasons, which is exactly as it is in this PR.

@tajobe tajobe merged commit dd9b8ca into master May 12, 2020
@tajobe tajobe deleted the features/main-scoreboard branch May 12, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants