1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How to change the plugin disable order?

Discussion in 'Development' started by mal0ne_23, Jun 23, 2017.

  1. mal0ne_23

    mal0ne_23 Spider Jockey

    Messages:
    30
    GitHub:
    mal0ne-23
    Hi. I have a plugin (2) that depends on another plugin (1), and when the server closes, 1 disables first, and 2 needs it to handle things for players correctly. How can I fix this?
     
    Muqsit likes this.
  2. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Add 'depend: pluginName' in the plugin.yml file.
     
  3. mal0ne_23

    mal0ne_23 Spider Jockey

    Messages:
    30
    GitHub:
    mal0ne-23
    Ahhhhhhhh.
     
  4. mal0ne_23

    mal0ne_23 Spider Jockey

    Messages:
    30
    GitHub:
    mal0ne-23
    This didn't work.

    [21:13:20] [Server thread/INFO]: Disabling Core v1.5.0
    [21:13:20] [Server thread/INFO]: Disabling KitPvP v1.0.0

    Core still disables before the KitPvP plugin. KitPvP depends on Core.

    plugin.yml:
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    A very poor workaround would be to make the dependant plugin's name start with a letter closer to the start of the alphabet than the independent one.
     
  6. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I think plugins disable according to the order in which they were enabled. If that's the case, the following in plugin.yml should make the plugin disable last
    PHP:
    loadPOSTWORLD
     
    Last edited: Jun 24, 2017
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    This is the default value if not specified...
    It's impractical to say "load my plugin last". What if two plugins ask for being loaded the last?

    It's probably a bug that plugins aren't disabled according to dependency.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.