Hi PMMP community! I’m rentedpanda, and I’m a little new to the PMMP plugin development space. I had previous experience in Spigot plugin development (Java), and seeing that the Bedrock Edition of MC has developed quite well and has a solid player base, I decided to commit myself to learn PHP in order to create plugins! I was sifting through some plugins on Github to see some differences between Java and PHP, and most were simply syntax differences, i.e. -> instead of ., use instead of import, etc. TL;DR, what would the learning curve from Spigot to PMMP be, considering I have literally 48 hours of PHP experience? Thanks, and I look forward to hearing your responses! PS: Do you guys still remember the Nether Reactor Core? I miss it...
What exactly is your question? You mentioned Java vs PHP, but you also mentioned Spigot vs PM. Do you specifically want to know about the API or the language? PocketMine was initially developed to match the Bukkit API, but there are a lot of difference as time goes, e.g. there is no @EventHandler annotation because you don't have annotations in PHP. (iirc it is a feature only present in Java and Python)
Sure let me clarify, How similar is coding a Spigot plugin to a PMMP plugin? My understanding right now is it’s pretty much similar other than a couple syntax changes and how a namespace isn’t default (Java’s “equivalent” is package).
If you are referring to a blind transition from Java to PHP, the main difference would be in threading. Other than that, I think you can figure out most differences easily as you develop.
Be sure to check out the Resources section if you haven't yet. It could be helpful if you have any problems while developing plugins. It has several walkthroughs involving the API and PHP, and while some are lacking, many of them are very detailed.