Server ready event

  • with the plugin im working on i have to get some server info that is not ready when the plugin is loaded. as a work around im using the serverReadyEvent to load my plugin. my plugin main class is loaded when plugin are loaded then waits for the serverReadyEvent before it continues.



    my current issue now is when plugins are reloaded the serverReadyEvent is not triggered so my plugin doesnt continue loading.

    my question is, could we get a Boolean Server.isReady or maybe an enum serverState(enum.State)? or am i already missing something in the api?

  • Du könntest das vorerst mit einem new Timer(0, 5f, 0, () -> { ... }); oder plugin.executeDelayed(5f, () -> { ... }); etwas Zeit Verstreichen lassen und ggf. Prüfen ob die Klasse geladen ist. Ich benutze das um Sachen die zu Groß oder wirklich am Ende Gemacht werden sollen.
    Oder du änderst in plugin.ymal die loadorder vieleicht kann das schon helfen.


    ####

    You could for the time being, with a new Timer(0, 5f, 0, () -> { ... }); or plugin.execute delayed(5f, () -> { ... }); some time to pass, and if necessary, Check whether the class is loaded. I use the stuff to be Great or really Made at the end.
    Or you change in plugin.ymal and load order maybe this can help.



Participate now!

Don’t have an account yet? Create a new account now and be part of our community!