GCC-Minecraft-Team / sps-mc-link-spigot

Spigot plugin to link SPS and MC accounts
3 stars 1 forks source link

Map config doesn't load #18

Closed nlaha closed 3 years ago

nlaha commented 3 years ago

The new map system doesn't load configs properly.

nlaha commented 3 years ago

seems the maps are loading in onMap before the config has had a chance to populate the "maps" map.

nlaha commented 3 years ago

It also seems like onMap isn't being fired for all maps, if at all in some cases.

nlaha commented 3 years ago

Seems like we might not be able to use the onMap event. See the following example: https://github.com/zDevelopers/ImageOnMap/blob/indev/src/main/java/fr/moribus/imageonmap/image/MapInitEvent.java

nlaha commented 3 years ago

fixed

nlaha commented 3 years ago

not fixed

nlaha commented 3 years ago

Temporary fix implemented, uses on player move so it's not ideal.

2kai2kai2 commented 3 years ago

Permanent fix by finding each registered map on startup and changing it.

Problem is that this uses the depreciated Server.getMap(int) method. In the future, this might be replaced if a better system can be found.