1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Getting started with PM plugin development

Discussion in 'Development' started by Donald Morrow, May 7, 2018.

  1. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    Hi guys. First post here. I just got through reading the FAQ in this tread while I am trying to get through the tutorial here:
    https://github.com/PocketMine/Documentation/wiki/Plugin-Tutorial
    My server is hosted by Apex, and it is currently running

    This server is running PocketMine-MP 1.7dev-920 for Minecraft: PE [REDACTED] (protocol version 3.0.0-ALPHA11)

    So, I went to git to look for the source code for this version, and I don't see it.
    The only two ALPHA10 releases are
    1.7dev-516
    1.7dev-501

    I am looking for the "920" dev version. I even tried searching for "920" and that only returned one hit in one file.

    So, how do I get started? I do not have the option to change my server version at Apex. The only bedrock option at Apex is "Pocketmine Latest".

    Also, what does "REDACTED" refer to in the version string above?

    Anyway, I've done a fair bit of development for personal projects in the past, but nothing for Minecraft. Mostly I've done java for Android, but I have done some php for some webservers several years ago. Hopefully I'll get up to speed quickly.
     
  2. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Go to ftp put Lastest PMMP File, REDACTED Is a author
     
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    No, REDACTED isn't an author, Definition of redacted document: Edited, modified, or revised document from which confidential or sensitive information has been removed, stop responding to things you are not sure, or that does not make any sense with the thread person's question.

    Answering "correctly" your question, you can get the .phar file on here: https://jenkins.pmmp.io/job/PocketMine-MP/ and then put on your ftp server.
     
  4. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/PocketMine.php#L85
     
  5. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
  6. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
  7. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
  8. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    That number refers to the Jenkins build: https://jenkins.pmmp.io/job/PocketMine-MP/

    Codename
     
  9. Eduardo

    Eduardo Baby Zombie

    Messages:
    100
    GitHub:
    xBeastMode
    Unless you don't want to spend an eternity writing symbols, you need an IDE, surely you can Google some free options.
    If you don't have enough knowledge of php you can check what we you need at http://www.php.net/manual/en/
    Lastly for plugin development just practice making plugins, it will get easier as you go (trust me); try learning from other plugin's sources or you can also try modifying them.
     
    Donald Morrow likes this.
  10. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
  11. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    You said ALPHA11 above, not ALPHA10 is old. Anyway the latest should be ALPHA12.
    The PocketMine API is similar to java-based APIs. It was based on bukkit, so it should be pretty easy to get started.
     
    Donald Morrow likes this.
  12. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    Holy crap, you are right! They must have just updated us to 11. Yes, I saw that APLHA12 was out as well. That may explain why some of my plugins started acting wonky over the weekend. I literally didn't even read that as I copied & pasted it.
     
  13. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    I am now trying to get the source code off my (Apex) server. I'm following the tutorial from here:
    https://github.com/PocketMine/Documentation/wiki/Plugin-Tutorial
    and the suggestion here to grab the source code from my server.

    In my pocketmine directory on the server, there is a jar subdirectory. In there is one file, pocketmine.phar. I knew that the plugins I create (and download) will be .phar files, but I didn't know the pocketmine itself was also a .phar file. Can I reference the pocketmine.phar file with netbeans? Or do I need to do something to the pocketmine.phar file, lie decompile it? Or am I still doing it wrong?
     
  14. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    you need to keep pocketmine.phar to make ur server run, but if your trying to update ur server version, download the latest stable build, rename it to whatever the current one is on ur server, then upload the new one
     
  15. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    Sorry, I should have explained better. This is related my OP where I am trying to set up netbeans for pocketmine plugin development, as described here:
    https://github.com/PocketMine/Documentation/wiki/Plugin-Tutorial

    Half way down, they talk about needing to reference the pocketmine source code:

    Since you are creating a PocketMine-MP plugin and going to use all its features, you want NetBeans to understand which namespaces, classes, properties, methods and function PocketMine-MP has. First, download the source code on Github.


    I've done this kind of thing before with other api programming, so this makes sense. But, when I go to github, my server version isn't available for download for some weird reason. So I posted here and someone suggested that I grab it from my server. So now we are up to where I posted here about an hour ago. I looked on the server and I saw the pocketmine.phar file, and I was wondering if that was what I needed to download. I was wondering if maybe the pocketmine.phar file contained the source code that I needed (sometimes you have to rename the file as .zip and you can extract it, but that didn't work here, as you guys probably would have known).

    So, maybe apex doesn't put the source code up on the server. If that's the case, what's my next option? How do I get started with plugin development?
     
  16. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    Never mind. First plugin has been created! "onEnable() has been called!" was logged, as I told it to. I know, baby steps.
    Fair warning, I may be asking a lot of questions in the near future as I get up to speed.
     
    RyanShaw likes this.
  17. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    did u manage to link the source code? btw i reccomend you use Phpstorm, its one of the best ides for php development, it also lets u add external libraries like netbeans
     
  18. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    and one of the most expensive IDEs if you don't have a free (open source/student) license.
     
    Angel, SalmonDE and EdwardHamHam like this.
  19. Donald Morrow

    Donald Morrow Spider

    Messages:
    7
    GitHub:
    mrgibbage
    Yes, I was able to get the source code. I did look at phpStorm but the licensing and cost kept me away. I believe you have to show that your OS project has been active for at least three months. I just want to make some plugins for my daughter's server.
     
    RyanShaw likes this.
  20. Flavius12

    Flavius12 Spider Jockey

    Messages:
    32
    GitHub:
    flavius12
    Personally I use Eclipse IDE which is free and well-made. It has almost all features of a paid IDE such phpStorm.
     
  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.