This is a simple script that automatically converts parts of your PocketMine-MP 4 plugin to API 5.
This can save you a lot of time and monotonous work.
Attention: This script is not perfect and may introduce bugs! Use at your own risk and always check the output (which often needs some manual conversion anyway).
Just run this script in a terminal and specify the path to your plugin's base directory:
php converter.php /path/to/your/plugin
- This script only converts the most common things; you will still have to do some manual conversion.
- This script will not add any
use
statements, even though it may introduce the use of new classes; this will break your plugin if you don't add theuse
statements yourself. - This script was written by me for my own plugins; it should work for most other plugins too, but it may not help you with some things.
Please note that script was partially generated by AI and automatically translated from C# to PHP by GPT-3. It may contain some bugs and errors. If you find any, please report them to me.