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

How to add Pocketmine as library in phpStorm

Discussion in 'General discussion' started by Levi, Jun 5, 2018.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    I watched Awzaw's video and I didn't get it. Is there any other way/simpler way?
     
  2. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    i get this errors:
    'ls' is not recognized as an internal or external command,
    operable program or batch file.
     
  3. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Go to
    upload_2018-6-5_15-15-11.png
    and add the paths to PocketMine-MP's "src" and "vendor" directories to your project's include path.
     
    artulloss and Jack Noordhuis like this.
  4. Tee7even

    Tee7even Slime

    Messages:
    81
    GitHub:
    tee7even
    You can also simply add the directory of your "PocketMine-MP.phar". It will index all the sources from the phars in that directory. More than enough for plugin development and simpler. Be aware though that if you place your packaged plugin in the "plugins" subdirectory of that dir where "PocketMine-MP.phar" is located it will index that too, which will result in multiple definitions of the same classes and such.
     
    dktapps likes this.
  5. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Where?
     
  6. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    yep, this works too.
    however I would personally recommend working with the source code when developing plugins, because Jenkins phars are preprocessed and may not contain original code because of this (it inlines heavily-used functions and such). Additionally working with phars is inconvenient when you stumble across a core bug or something, and want to edit some code on the fly.
     
  7. Tee7even

    Tee7even Slime

    Messages:
    81
    GitHub:
    tee7even
    Well, phars do contain the whole PocketMine API, inlined functions don't matter too much, when you only want to make a plugin.
     
  8. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Where?
     
  9. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Solved the library thing
     
  10. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    but why aren't commands such as 'ls' not working in PHPStorm terminal?
     
  11. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    `ls` is a Linux command. You have to install utilities like Git Bash or cygwin64 to use them. In Windows, the counterpart command is `dir`.
     
  12. Tee7even

    Tee7even Slime

    Messages:
    81
    GitHub:
    tee7even
    Guess you've finally noticed @dktapps' post.
     
  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.