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.
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
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 )
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
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?
@PEMapModder has worked on a project that wraps a PocketMine server: https://github.com/PEMapModder/PocketMine-Wrapper
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.
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.