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

how to run pmmp in source code on windows

Discussion in 'Help' started by Levi, Mar 19, 2019.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    how to run pmmp in source code on windows
    my start.cmd
    Code:
    @echo off
    REM Set TIMEOUT to how many seconds you want in between when the server stops to when the next restart takes place
    set TIMEOUT=0
    cd /d %~dp0
    netstat -o -n -a | findstr 0.0.0.0:19132 > NUL
    if %ERRORLEVEL% equ 0 (
    goto :loop
    ) else (
    echo "Script has been initialized."
    goto :start
    )
    :loop
    ping 127.0.0.1 -n %TIMEOUT% > NUL
    netstat -o -n -a | findstr 0.0:19132 > NUL
    if %ERRORLEVEL% equ 0 (
    goto :loop
    ) else (
    ping 127.0.0.1 -n %TIMEOUT% > NUL
    echo "Server stopped. It'll be restarted in %TIMEOUT% second(s). You can press Ctrl+C to stop the restart process if you don't want to restart."
    goto :start
    )
    :start
    if exist bin\php\php.exe (
    set PHP_BINARY=bin\php\php.exe
    ) else (
    set PHP_BINARY=php
    )
    if exist PocketMine-MP.phar (
    set POCKETMINE_FILE=PocketMine-MP.phar
    ) else (
    if exist src\pocketmine\PocketMine.php (
    set POCKETMINE_FILE=src\pocketmine\PocketMine.php
    ) else (
    echo "Couldn't find a PocketMine-MP installation..."
    pause
    exit 1
    )
    )
    %PHP_BINARY% -c bin\php %POCKETMINE_FILE% %*
    
    
    goto :loop
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
  4. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Either unphar the phar and extract vendor folder from it
    Or run the command "composer.bat install" located in bin folder
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    If you can't figure it out by googling it, then you probably shouldn't be attempting it.

    http://xyproblem.info/
     
  6. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    The XY problem is asking about your attempted solution rather than your actual problem.
    What's this got to do with this
     
  7. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Why are you trying to run it from source? It's highly recommended to just use the phar.
     
    SOFe and jasonwynn10 like this.
  8. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
     
  9. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Modifying pmmp stuff
     
  10. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Are you saying i asked my solution attempt
    I asked how to run src on windows
     
  11. Mr174

    Mr174 Baby Zombie

    Messages:
    187
    GitHub:
    mr174
    Download the pocketmine-mp phar unphar it and it should work
     
  12. Mr174

    Mr174 Baby Zombie

    Messages:
    187
    GitHub:
    mr174
    Extract both vendor and src
     
  13. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    I like how my post is invisible
     
    Aericio likes this.
  14. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    That's the point. Most things in PocketMine can be changed via plugins, unless you're doing something we explicitly do not permit, which then we have a reason for doing so.
     
    jasonwynn10 and EdwardHamHam like this.
  15. Can a plugin change the API version or codename (if those still exist, which they should because they were cool) of PM?
     
  16. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Can plugin change what is inside CommandSender.php
     
  17. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Why would you change the file contents when you could extend the class?
     
    EdwardHamHam likes this.
  18. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Could extend what class
     
  19. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    The CommandSender class.
     
  20. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    i ran compsoer.bat and it ran but closed immediately
     
  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.