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

Update markers every once in a while (+cache) #6

Open
TechnicJelle opened this issue Dec 24, 2023 · 3 comments · May be fixed by #66
Open

Update markers every once in a while (+cache) #6

TechnicJelle opened this issue Dec 24, 2023 · 3 comments · May be fixed by #66
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@TechnicJelle
Copy link
Owner

TechnicJelle commented Dec 24, 2023

Currently, the plugin creates markers for each sign, once when BlueMap loads.

The markers should probably update more often than that.

On a timer?
I don't really like that idea a whole lot...

Perhaps based on events from the server?
I like that a bit more, I think...
Although making this plugin cross-platform would be a bit more effort if I do that.
I think it'd probably be worth it, though.

Maybe I could also just base it off the world files changing, just like BlueMap does.
However, it may be nice if the signs were (near) instant.

@TechnicJelle TechnicJelle added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Dec 24, 2023
@TechnicJelle TechnicJelle mentioned this issue Mar 5, 2024
4 tasks
@ShDis
Copy link

ShDis commented Mar 6, 2024

Is there a way to bind something like "PlayerPlacedSign" and "PlayerEditedSign" events to plugin code for instant updates?

@TechnicJelle
Copy link
Owner Author

There is a SignChangeEvent, but no dedicated SignPlacedEvent or SignRemovedEvent.
There is a BlockPlaceEvent that can be used to detect sign placements.
However, detecting sign removals is more difficult, as there are many different ways for a block to be removed. It can be mined by a player, or exploded.
And in the case of signs, the block it's attached to could be removed as well, causing it to pop off. And can signs burn? I'm not sure, but they are made of wood...

@TechnicJelle
Copy link
Owner Author

TechnicJelle commented Mar 6, 2024

I've done a similar architecture in my Offline Player Markers addon, which loops through the playerdata NBT files on server startup to add the markers to the map, and from then on, it uses the server events to add/remove markers.
But even that plugin does not cache them...

Properly adding caching to something like this is very very difficult....
One of the challenges is having to take changes into account properly.

@TechnicJelle TechnicJelle changed the title Update markers every once in a while Update markers every once in a while (+cache) Mar 20, 2024
@TechnicJelle TechnicJelle linked a pull request Nov 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants