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

please let me know the basics of code to make the plugin pocketmine

Discussion in 'Development' started by MadeUpadanaYT, Jan 23, 2017.

  1. MadeUpadanaYT

    MadeUpadanaYT Spider

    Messages:
    12
    I was just about to make the plugin pocketmine, but the problem is I do not know the code of the code to make the plugin pocketmine. so, please tell me the code of code and how to create a plugin for pocketmine
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    lets start with the very basic foundation:
    PHP - to learn it visit PHP.net here is a more direct link http://php.net/manual/en/langref.php
    PHP OOP - http://php.net/manual/en/language.oop5.php
    after that you are pretty much all set, you have a few options:
    you can go with learning from other plugins OR
    Learning from reading the source code itself

    regardless which you choose if you have a stable foundation there almost nothing can ever stop you from doing what you wanted
     
    Marabou, xBeastMode and SpopovabgS like this.
  3. kaliiks

    kaliiks Zombie

    Messages:
    250
    Look at basic php tutorials on youtube
     
  4. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    In all honesty I wouldn't trust many YouTube tutorials. A lot of the ones I've come across have been outdated or use terrible methods. The only YouTube channel I've found that has good, modern tutorials is CodeCourse, but he is more aimed at the web-development side (tutorials on frameworks like Laravel and Slim) so most of his more recent stuff would be useless here. I would recommend he look at the php docs first to get a general feel of the language.
     
    HimbeersaftLP and Thunder33345 like this.
  5. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    same here i am more inclined to say use PHP.net even tho some of the websites offer nice ways to get into PHP
     
  6. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    At the very least OP should (try to) stay away from generic YouTube tutorials and W3Schools. I have seen some horrid and just plain incorrect examples/tutorials on both those sites and they can be very misleading to those just starting out.
     
  7. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    In my opinion practising is the best way to learn coding there is. Try to start using the SUPER basic things, and build upon that. Want to know how to create an array? Search for how to create an array in php. Want to know how to get a player by name? Search the internet. This is in my opinion the best way to learn PHP AND PocketMine API there is.

    Coding and plugin developing isn't a thing you learn in a day. You have to practise over and over, and learn from your mistakes. Learning basic PHP is definitely required first though.
     
    Last edited: Jan 24, 2017
  8. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    Assuming he knows little to no php, his first step should probably be to read up the docs before jumping into plugin development. Learning the language the API is in is always a good first step. Otherwise yeah I agree here. Practice makes perfect after all. Reading the Pocketmine source and other people's plugins is a good way to learn plugin development as well (though not really a good way to learn the language itself)
     
    Sandertv likes this.
  9. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Yes, I totally agree. If people now php, they will have no problem reading PM src code and understanding how to do things instantly.
     
    HimbeersaftLP, Redux and Sandertv like this.
  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.