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. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    just like the PocketMine-MP.phar
    The magic is at the stub.
    Also, if the stub starts with a #!/usr/bin/env php shebang line, you can execute the phar directly like a shell script.
     
  2. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    I am (unfortunately) not a phar master. Could you give me a sample/example file and how to convert it and I should be able to get it from there
     
  3. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Look at how devtools does it :p
     
  4. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    :p Dev tools doesn't help so much though. I need to be able to execute the phar. I don't know which stub to use or what I should put at the beginning of my original file (a.k.a. #!/usr/bin/env php )
     
  5. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Hmmmm I have not been able to find anything useful on google...
     
  6. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Then look how pocketmine does it :p
     
  7. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    :p Yeah good idea. I did find a nice .php to .phar converter on github and finally figured out the right #!/usr/bin/env php line to put at the top so I finally made an executable .phar :D
     
  8. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Ok @SOFe I made a working phar that can install plugins. How can I restart/stop/and or start the server from outside a PM plugin?
     
  9. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    make a wrapper that wraps around PM and somehow access the wrapper API to tell it to do stuff?
     
    HittmanA likes this.
  10. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    I am unsure how to do that. @SOFe should be able to tell me though.
     
    Thunder33345 likes this.
  11. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Ok so downloading is done (minus server restart). What needs to be done now?
     
  12. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    crawling the plugin directory
    or the list of plugins
     
  13. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    Why?
     
  14. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    I guess so you could see if plugins need updating?
     
  15. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
  16. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    so pmpm will have a use duh
    the use is to dl plugin from dir right?
     
  17. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I think it is always better if you just store an additional plugins/pluginManager.json file to store data about the plugins installed. This is better than checking them every time, and you won't accidentally scan plugins installed from other methods.
     
    HittmanA likes this.
  18. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    I meant to connect to poggit api to download plugins when user request it
     
  19. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    That doesn't require scanning the plugins folder every (insert time increment here). As @SOFe said
     
  20. HittmanA

    HittmanA Zombie

    Messages:
    207
    GitHub:
    hittmana
    The use is to download plugins to the plugins dir, (in the future) upload to Poggit from a folder in the plugins dir (/plugins/myplugin gets turned into a phar and uploaded to Poggit), update plugins, and remove them.
     
  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.