Solved Check when server is done starting up.

Discussion in 'Plugin Development' started by Blockhead7360, Oct 8, 2016.

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

    Blockhead7360

    Hello!

    I have a few questions. I am making a plugin that includes an API and that shows the size of a specific list when loading.

    Basically, other plugins add a specific object to that list (using the API) and then when my plugin starts up, it shows the size of the list. However, I'm guessing that if my plugin starts up before the others, the list size won't be as large without the other plugins adding the object to the list.

    I was wondering how to check to see if the server startup is done or if the reload is complete. This is because once the reload is complete, I can say how many of the objects are loaded because all the other plugins have already loaded and have added the object to the list.

    Thanks!
     
  2. Offline

    I Al Istannen

    @Blockhead7360
    Schedule a BukkitRunnable inside the onEnable. It should run once the startup is complete.

    The API users will probably depend/softdepend on your API which means their plugins will ALWAYS load AFTER yours.
     
    Blockhead7360 likes this.
  3. Offline

    Blockhead7360

    Got it! Thanks!
     
  4. Offline

    I Al Istannen

    @Blockhead7360
    No problem :)
    Glad I could help!

    Good luck with your API ;)
     
Thread Status:
Not open for further replies.

Share This Page