TownyAdvanced / MapTowny

A Towny add-on Bukkit plugin that enables towns to show up on a web-map.
MIT License
22 stars 18 forks source link

Towny layer is lost when reloading Pl3xMap #60

Open Folas1337 opened 4 months ago

Folas1337 commented 4 months ago

Describe the Bug

When you're running MapTowny alongside Pl3xMap and use '/map reload', the layer for MapTowny is lost and can only be retrieved by restarting the server.

Expected Behavior

The layer should persist even after a reload.

Plugin Version

MapTowny version 3.0.0-ALPHA-2

Towny Version

Towny version 0.100.3.3

Pl3xMap Version

Pl3xMap version 1.21-501

Server Software Version

This server is running Paper version 1.21-46-master@2fa5e0e (2024-07-06T21:32:48Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

Additional Comments

I asked on the Pl3xMap Discord whose fault this might be and here are some comments:

Haven wrote:

maptowny is probably adding them with the api instead of a config file, that's my assumption

BillyGalbreath wrote:

that would be MapTowny's fault. Pl3xMap throws out some events to let other plugins/addons know whats up. For the addon to re-add their marker layer they need to listen to the WorldLoadedEvent

silverwolfg11 commented 4 months ago

Thanks for reporting this! I wasn't aware that the layers didn't persist on Pl3xMap reload, so I'll check out that API.

Folas1337 commented 3 weeks ago

Seems that's working beautifully on the latest alpha 3.0.0-ALPHA-3 :+1:

From my side this ticket can be closed but if you want to keep it open until you actually release 3.0.0 that's fine, too.