Hello, I am new here and I have a question. Can you set the API of the server in a plugin if you can how? Sorry I'm just started learning PHP
I know. Sorry for any miscommunication. I meant API of the server, through a plugin. Sorry if I wasn't clear enough.
Currently no, there is no way other than modifying source as mentioned above. I doubt there will be a way, because the API is bumped for the good reason that there's a lot of backwards incompatible changes.
there are various tools on different websites to bump the API versions of plugins. Here is one that I believe works: DevTools/pocketmine.php I recommend using the API3 injector. Be warned that changing the API without ensuring that the plugin is compatible may cause unforeseen consequences
yes you may but it would require good knowledge of PHP note for the wizards Spoiler You would need phar extension that's capable of writing OR PM in uncompiled source you would need to locate "PocketMine.php" targeting this line, https://github.com/pmmp/PocketMine-...30ee507c7e4/src/pocketmine/PocketMine.php#L77 your best bet would be to foreach the whole file in lines and regex match the const name for "optimization" you could skip to line 77 to check if it's there only then use the foreach trick after obtaining the line to target overwrite it with whatever you want, like const "API_VERSION = "5.5.5";" you would need to save and reboot PMMP to let it take effect i doubt reflection class would do the trick ALSO note: do this on your own risk, this is just a theory
No, do not do this. The author has not actually catered for changes in API 3.0.0 alphas, it's exactly the same as the 2.0 one except with different numbers.
If the server API version doesn't need modification, it doesn't need bumping in the first place... (With the exception of anything from Microsoft)