You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking a lot at the BossBar api and wanted to propose a few changes.
I'm not one to figure out when things should be deprecated/removed, but I can throw out deprecation in v5, removal in v6 as a plan.
Converting BossBar to a class and removing BossBarImpl.
BossBar is currently a sealed interface with BossBarImpl being its only permitted implementation.
I don't think that there are any plans to make another implementation of BossBar (correct me if I'm wrong).
This won't break any of the main implementations of adventure. The Paper, Velocity, Sponge, Fabric, and NeoForge implementations not only still use the adventure 4 api, but they all use BossBar instead of BossBarImpl.
It can also reduce confusion between BossBarImpl and BossBarImplementation, as they have similar names.
Remove HackyBossBarPlatformBridge.
Only the Sponge API uses this class, and it's used to make BossBarImpl inherit their BossBarBridge class.
The mixin can easily target BossBarImpl (or BossBar if it becomes a class) instead of HackyBossBarPlatformBridge. (Correct me if I'm wrong)
This may cause api issues, so the class should probably be deprecated instead of outright removed.
Make BossBar#viewers and BossBarViewer#activeBossBars return Sets instead of Iterables.
This may just be the beginner in me, but I feel like Sets are easier to handle than Iterables.
In this case BossBar#viewers would go from returning Iterable<? extends BossBarViewer> to Set<BossBarViewer>, and BossBarViewer#activeBossBars would go from Iterable<? extends BossBar> to Set<BossBar>
I've been looking a lot at the BossBar api and wanted to propose a few changes.
I'm not one to figure out when things should be deprecated/removed, but I can throw out deprecation in v5, removal in v6 as a plan.
BossBar#viewersandBossBarViewer#activeBossBarsreturn Sets instead of Iterables.BossBar#viewerswould go from returningIterable<? extends BossBarViewer>toSet<BossBarViewer>, andBossBarViewer#activeBossBarswould go fromIterable<? extends BossBar>toSet<BossBar>Thoughts?