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

Question How do you know about plugin coding?

Comments in 'General Discussion' started by minebuilder0110, Apr 1, 2015.

  1. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    How do people learn about PHP, specifically on PocketMine plugins? I can understand the code, but do not know how to write it. Where can you learn? (It would be even better if it was dedicated to this, but I don't expect this because this is just a small part of the whole PHP stuff)
  2. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
  3. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Myself started by looking at other's people code and making small changes... these changes get progressively bigger over time...
    iJoshuaHD likes this.
  4. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
    "The delights of self-discovery are always available." - Gail Sheehy
  5. sekjun9878
    Offline

    sekjun9878 Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    108
    Plugins:
    1
    Minecraft User:
    sekjun9878
    Yes, I learnt PHP by modifying existing plugins as well. You can always learn the pure language first, if that's your type of thing, but for me that gets boring fast.
  6. iiRushii
    Offline

    iiRushii New Member

    Joined:
    Dec 29, 2014
    Posts:
    6
    Minecraft User:
    _iiRushii_
  7. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    same here :p
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I started by reading the almost-nothing information about PHP on Wikipedia (there I learnt two important things: 1) it is similar to JavaScript; 2) variables must start with $)
    Then I tried reading PHP's official manuel. But reading as far as globals I decided to stop reading because it causes headache.
    Then I read the tutorials by @Glitchmaster_PE. Thanks to him, I understood a plugin's basic structure.
    Then I read the Economys Airport plugin. There I learnt about Config and other things.
    After that, I used PHP's function manuel frequently. I learnt the concept about functions from JavaScript. 3 months later I partially understood the concept of a class from Java (by making syntax and compile time errors on Eclipse).
    Meanwhile, tracks of my learning can be dug out from the forums and my GitHub. As well as my http://minecraftforum.net account, although it got abandoned a long time ago.
    HotFireyDeath likes this.
  9. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    I started by modifying existing plugins to suit my old server.
  10. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    How do you modify existing plugins? When i try to open it with Geany (the programing app I use) it doesn't do anything
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Extract it first.
  12. DunxandMinecraft
    Offline

    DunxandMinecraft Active Member

    Joined:
    Oct 26, 2014
    Posts:
    158
    Thanks, I think I might try to make a plugin. At the moment I currently just do small edits to plugins such as SimpleAuth and other things.
  13. Bublz_654
    Offline

    Bublz_654 Active Member

    Joined:
    Dec 31, 2014
    Posts:
    120
    Do you extract the .phar using DevTools ?
  14. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    Yes, that worked for me
  15. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes.
    Try something more simple first. No offense, but plugins by @Gamecrafter are the examples of "simple coding".
  16. DunxandMinecraft
    Offline

    DunxandMinecraft Active Member

    Joined:
    Oct 26, 2014
    Posts:
    158
    OK
  17. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I started making games in a program called GameMaker and used a language called GML (Game Maker Language). Then I moved on after a year and got into HTML and JavaScript and a bit of PHP. I discovered PocketMine and picked it up quickly because of my previous experience and only needed to learn object-oriented programming.
    DunxandMinecraft likes this.
  18. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    I learned PHP the usual way: by making websites on apache with PHP scripts. I already knew python and a little bit of Java, so my basic understanding of PHP stuck with me until I discovered PocketMine. At first I was like: "What!? A MCPE server IN PHP?". Then I calmed down and wrote some plugins.
  19. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I thought the same thing and still haven't calmed down to this day.
    PEMapModder, jython234 and Falk like this.
  20. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    php.net and codecademy.com helps a lot. also read plugin examples on github and docs.pocketmine.net :)

Share This Page

Advertisement