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

[Suggestion] "Native" plugins for Bluemap #251

Open
Mark-225 opened this issue Oct 22, 2021 · 2 comments
Open

[Suggestion] "Native" plugins for Bluemap #251

Mark-225 opened this issue Oct 22, 2021 · 2 comments

Comments

@Mark-225
Copy link
Contributor

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

  1. Go through the effort of developing and maintaining an addon multiple times for all major platforms.
  2. 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

  1. Motivate more developers to make creative addons because every BlueMap user could benefit from them.
  2. 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.

@TBlueF
Copy link
Member

TBlueF commented Feb 20, 2023

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)

@normanfeltz
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

3 participants