Solved Doing something after all worlds have loaded?

Discussion in 'Plugin Development' started by ColonelHedgehog, Nov 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ColonelHedgehog

    In my EquestrianDash plugin, I'm adding a "TrackRegistery." All TrackData is saved to a config file. To get the plugin to recognize the data, I register the data into the TrackRegistry, not unlike how you'd register an event. The problem is the Track class can only be initialized with a world. This means the world has to exist, and since worlds don't seem to exist onEnable, I'd need to do something different. So the solution seems obvious, initialize each track and add it to the registry when the world loads, right? Well, that's the problem. WorldLoadEvent and WorldInitEvent don't really seem to work for my purposes (if at all), and I'd much rather not use a scheduler because there's no telling how long it will take for everyone's servers to load their worlds.

    So to sum up my question: how would I do something only after all worlds "exist?"


    EDIT: "load: POSTWORLD" rofl

    I need to use my brain more.
     
Thread Status:
Not open for further replies.

Share This Page