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

PMPM - PocketMine Plugin Manager

Discussion in 'General discussion' started by HittmanA, Nov 21, 2016.

?

Should PMPM...

  1. Be integrated with Poggit

    100.0%
  2. Use my service which would replace Poggit

    0 vote(s)
    0.0%
  1. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Thats not how PMPM works. Although its not a bad idea. How PMPM currently works is /download <pluginname> and it downloads that plugin from Poggit.
     
  2. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    So what's with this one click install stuff? All they need is the url or plugin name...
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Nobody will trust you with their FTP and RCON. Have you ever seen any online MySQL clients (public-hosted ones, not self-hosted ones like phpMyAdmin)? No.



    I forgot to emphasize, It is discouraged that you change the content of a running phar file. You should not change the contents of a loaded plugin when the server is running. Therefore, I don't think a plugin as a plugin manager is a good idea.
     
  4. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Ummm why do you think my code edits running phars?
     
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Because you have to update a plugin?
     
  6. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    I never said it is updating a plugin.
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What is the use of it if you can only download new plugins but not download updates?
     
  8. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Good point :p . Updates will be a feature. (/update <plugin> or /updateall).
    Why is it discouraged to edit running phars? They are already in memory when the server starts so editing them should not affect anything, right?
     
  9. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What if a new class has to be loaded when the plugin is disabled?
     
  10. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    What do you mean?
     
  11. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Wait do you mean that while PMPM is updating the plugin a method on that plugin gets called but it wouldn't exist at that moment?
     
  12. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    PocketMine uses a JIT class loader. Unless the class is needed, it won't get loaded. So for example, if a plugin creates a DisableTask when it is disabled, and the class is not used anywhere else, PocketMine would attempt to load such class, but if you have already modified the phar, the file can no longer be loaded. This may lead to severe consequences, because it will crash, and some plugin data may not be saved.
     
  13. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Hmm. Is there any way around this, or a recommended way of doing this?
     
  14. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    No. Nothing inside the context of a plugin. You can of course find a way to execute it after server stops, e.g. use a cron job, but that's definitely a bad idea. Or you can register_shutdown_function, but that's unreliable.
     
  15. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    What about writing to the plugin and the restarting the server afterwards? That would ensure everything worked right?
     
  16. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What do you mean by "writing to the plugin and the restarting the server afterwards"? Isn't this what we are talking about?
     
  17. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    From a pmmp team member who has never posted any posts on this website:
    Pasted image at 2016_11_22 12_06 AM.png
     
    Sandertv and HittmanA like this.
  18. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    I thought you meant simply editing the running phar and not restarting it. I meant editing the phar and then restarting the server immediatly afterwards.
     
  19. Jack Noordhuis

    Jack Noordhuis Zombie Pigman Poggit Reviewer

    Messages:
    618
    GitHub:
    JackNoordhuis
    Your best bet would be to check which plugins need to be updated, disable them, install the updated phar and then enable them or reload the server.
     
    HittmanA likes this.
  20. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Did you notice that I keep mentioning disable? Even if you restart the server immediately afterwards, you still have to let that plugin disable first.

    Of course you can disable that plugin before writing the phar, but look at that comic. You are destroying code that is already loaded, which is always bad even if it should not happen.
     
  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.