FeatherBoard Shown Scoreboard Priority Management
Feature Request
SpigotMC Username
Please provide your SpigotMC username:
Username: Raremote
Feature Description
Please describe the feature you would like to see implemented:
Description:
For scoreboards to have a "ActiveScoreboardPriority" to where you can set the default scoreboard to 1 have another scoreboard set to 2, another to 3, etc... Each scoreboard ActiveScoreboardPriority can be independently managed in the plugin which uses FeatherBoard-API. This would allow separate plugins using custom scoreboards to independently manage which scoreboard should be displayed without overcomplicated logic between multiple plugins using FeatherBoard-API.
I really need this to simplify which scoreboard needs to appear across multiple plugins each of which are using the API. If you do not have time I would be willing to attempt this, but may not be likely since FeatherBoard itself is closed-source
Additional Information
If there is any additional information or context that would help us understand your request, please include it here:
Additional Information:
Here is an example of usage (This assumes that the default scoreboard will always be included by default at 1 priority)
scoreboardManager.setActiveScoreboardPriority(player, "party", 2);
My koth (King of the Hill) plugin triggers a distance based show/hide of the "koth" scoreboard
When in range of koth priority of 3 will be set
scoreboardManager.setActiveScoreboardPriority(player, "koth", 3);
After player goes out of range of the koth set priority for koth to 0 effectively removing it from ActiveScoreboardPriority Map and then display scoreboard associated with a key from the Map which has the highest priority value
scoreboardManager.setActiveScoreboardPriority(player, "koth", 0);
Also player's uniqueId UUID would need to be managed as well so may look something like HashMap<UUID,HashMap<String, Integer>>. I understand for this plugin you don't want to have a lot of memory used unnecessarily which is why I recommend having a config option to select whether legacy or ActiveScoreboardPriority should be used.
When the priority of a scoreboard is set to 0 then simply have the scoreboard removed from player's HashMap<UUID,HashMap<String, Integer>>
Within setActiveScoreboardPriority additional logic should be added to loop through Map values to see which key has the highest value and display it dynamically
Edited by Raremote