[Suggestion] "Native" plugins for Bluemap
Mark-225 opened this issue · 2 comments
Okay, the title might sound like a pluginception (and this was probably already requested at some point) but hear me out:
I think a (very basic) integrated plugin/addon loader that works across all BlueMap implementations would be a great feature.
Current Situation
There already are a few addons for BlueMap that don't really require any platform-specific features like the Bukkit API and I'm sure there are still lots of possible ideas for such addons, especially when BlueMap API features continue to expand further.
(Examples for the types of addons I'm talking about would be: automatic markers for structures, biomes, offline players, static entities, block entities and probably many more.)
These addons and ideas are currently held back by one huge hurdle:
Developers have to either
- Go through the effort of developing and maintaining an addon multiple times for all major platforms.
- Choose just one platform, making their addon useless for anyone on a different platform.
Possible Approach
By implementing a plugin loader, enabling addons to listen to the few basic events BlueMap already forwards from each implementation and exposing all the BlueMap "adapter" types (such as the Player class), many simple addons could be developed completely independent of any platform. All they would need is Bluemap (and some that don't require events could even work on the CLI).
Motivation/Reasons
Now, I know this is not as simple as just exposing some classes to the API and writing a simple jar file loader. There's probably loads of small tweaks on the internal workings of BlueMap and other additions needed for this to be possible.
But I think it would still be worth it, because it would
- Motivate more developers to make creative addons because every BlueMap user could benefit from them.
- Attract more users because many useful addons will be available on their platform of choice.
"Disclaimer"
This is just an idea for some time in the mid to far future and maybe way out of scope of this project but I just wanted to make a proper suggestion anyways explaining the benefits I think it would have.
Notes:
- load-order & addon dependencies?
- custom block-renderers / access to resourcepack
- turn Storage-enum & Compression enum into registry -> enable custom storages/compressions
- Events
- event when player-visibility toggles (
WebApp#setPlayerVisibility
)
- event when player-visibility toggles (
Hi,
It is a good idea with a internal system of plugin.
I would also like to create a plugin, i use BlueMap in standalone version with the maps copied once a week during the daily routine (restart & backup).
I want to report the maps updating and the progression on a discord channel, a plugin system with a event api would allow me to do this very easily.
Cordialy
Norman