-
-
Notifications
You must be signed in to change notification settings - Fork 148
Description
Currently there is an interface called "BossBarViewer", and it has two uses:
- It is used in
net.kyori.adventure.bossbar.BossBar#viewerswhich returns anIterable<? extends BossBarViewer>. - It defines an
activeBossBarsfunction that returns anIterable<? extends BossBar>.
Given how this interface is not used in the BossBar#addViewer or BossBar#removeViewer, I think it'd be a good idea to either remove the BossBarViewer interface or spread out its use.
To remove the interface, the activeBossBars function could be moved to the Audience interface, which would not be out of line due to Audience already having the showBossBar and hideBossBar functions. Then, the BossBar#viewers function would simply return Iterable<? extends Audience>.
To expand it's use, I think it would be a good idea to move the Audience#showBossBar and Audience#hideBossBar functions to BossBarViewer. The BossBar#addViewer and BossBar#removeViewer functions would also be modified to take a BossBarViewer object as the parameter.
As for the effects these changes will have on the implementations, adventure-platforms doesn't seem to support bossbars yet anyways, and I'd be willing to help with working on a solution for paper, but I doubt I'll be much help considering I don't know much about the codebase.
I'll work on both these solutions in time on a fork, but I figured I'd make this issue to pose the idea.