I'm trying to load in markers on start with this event, but when the event is called. The WorldRegistry (Pl3xMap.api().getWorldRegistry()) is still empty. Meaning I can't make a layer and thus not register markers.
Main class;
@Override
public void onInitializeServer() {
ServerLifecycleEvents.SERVER_STARTING.register(server -> {
SERVER = server;
Pl3xMap.api().getEventRegistry().register(new Pl3xMapStart());
});
}
Event;
private static class Pl3xMapStart implements EventListener {
@EventHandler
public void onEnable(Pl3xMapEnabledEvent event) {
// initialize manager
MARKER_MANAGER.loadLodestones(); // this creates markers and tries to register them
}
}
}```
I'm trying to load in markers on start with this event, but when the event is called. The WorldRegistry (
Pl3xMap.api().getWorldRegistry()
) is still empty. Meaning I can't make a layer and thus not register markers.Main class;
Event;