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

Where can i find a list of functions I can use in events or how to know which I can use in each even

Discussion in 'Development' started by Remarkabless, Dec 3, 2017.

  1. Remarkabless

    Remarkabless Slime

    Messages:
    83
    GitHub:
    Remakem
    Hey, i have a hard time knowing like finding the getNewItem() like ive never seen that before until I saw a function, where can I get a list of all of those •Sub-Functions• idk if thats what you call them.
     
  2. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    You can check them on the PMMP GitHub repo (https://github.com/pmmp/PocketMine-MP) or you can use an IDE like PHPStorm and add PMMP source as a library and it can auto complete for you.
     
    jasonwynn10 and NickTehUnicorn like this.
  3. Remarkabless

    Remarkabless Slime

    Messages:
    83
    GitHub:
    Remakem
    Yes I can see the general events and stuff but like I said where in the source can i find them?
     
  4. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    Go to the repo... Go to src... Go to pocketmine... Go find whatever class you're looking for...
     
    jasonwynn10 likes this.
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Perhaps you should know more about object-oriented programming. For example, in your main class it extends PluginBase, so you can find functions in the PluginBase class. getServer() returns a Server object, so you can go looking at the Server class. When you have a Player, it extends Human, which has a getInventory() method returning a PlayerInventory. Not all code are well-documented, but through looking at more places in the source code, you can understand better.
     
  6. friscowz

    friscowz Baby Zombie Ban Evader Banned

    Messages:
    128
    GitHub:
    friscowzmcpe
    If you have a pc, just install one of those good code editors like PHPStorm, it will help you alot :)
     
  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.