Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What next?

Comments in 'Plugin Development' started by Tethered_, Jun 24, 2014.

  1. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    I have just spent the past few days on codecademy working on the PHP. I have just finished it and feel pretty comfortable with the language. I'm sure this is a stupid question, but what next? Where should I go to start creating plugins, because I know there are certain functions that must be used in pocketmine. Please help!
    TheRealJ2KK2J and Lambo like this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Read the PocketMine source code. If you feel you are OK enough, you should be able to understand the whole code if you read starting from PocketMine.php.

    But the above is a semi-troll, because it is very hard to understand the source if you are new. The best is to read some documentations and tutorials, like those at the resources subforum of this plugin development forum. (You can find it above this thread)
    Tethered_ and jerlegoman like this.
  3. jerlegoman
    Offline

    jerlegoman Active Member

    Joined:
    Dec 10, 2013
    Posts:
    120
    Minecraft User:
    jeremy647
    I learn something's by looking at some peoples plugin codes but sometimes I also learn php from php.net but most of the time i just ask the great and genius PEmapmodder and swagboy47 :);)
    swagboy47 likes this.
  4. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Where is this located exactly? Or should I just feel comfortable with the all the files in /PocketMine-MP/src?
  5. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    If you go to the "Plugin Resources" section, @shoghicp posted some links to important stuff such as a plugin tutorial to get you started, and I think links to PocketMine's GitHub (where the source code is located).
    Tethered_ likes this.
  6. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
  8. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    looked at some plugins, the source code, and a few other things and I've got to say, my confidence has been demolished. I felt pretty good on codecademy but now I feel SO lost. Are there other things like codecademy I should do before diving into plugin development?
  9. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    try reading some plugins and try to find what each part means and function.
  10. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Are there certain plugins that are simpler than others and should be looked at?
  11. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Actually, correct me if I'm wrong:

    The pocketmine source code is a bunch of code that creates variables, methods, classes etc.

    When you make a plugin, you extend the plugin class and reference methods and variables defined in the src. So you use php for the "structure" but pocketmine-created things for "the meat" of the plugin if you will.

    The trick is just figuring out which things to reference in each specific occasion.
    PEMapModder likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PocketMine-MP had a wide range of class usage (as you see, so many classes, one file for each).

    Look at the documentation comments to help making plugins.
  13. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Documentation comments?
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes. doccomment, the ones surrounded with
    /**
    blah blah blah
    @param blah $blah
    @return blah
    */

    They are most useful, and more useful with tools like PHPStorm.
    Tethered_ likes this.

Share This Page

Advertisement