how to run pmmp in source code on windows

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

  1. Levi

    Levi Zombie Pigman

    Messages:
    763
    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 Wither Skeleton Poggit Reviewer Verified

    Messages:
    1,331
    GitHub:
    jasonwynn10
  3. Levi

    Levi Zombie Pigman

    Messages:
    763
    GitHub:
    captainleviftw
  4. wolfdale

    wolfdale Zombie

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

    jasonwynn10 Wither Skeleton Poggit Reviewer Verified

    Messages:
    1,331
    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 Zombie Pigman

    Messages:
    763
    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. Edwardthedog2

    Edwardthedog2 Skeleton Verified

    Messages:
    870
    GitHub:
    edwardthedog2
    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 Wither Skeleton Poggit Reviewer Verified

    Messages:
    1,331
    GitHub:
    jasonwynn10
     
  9. Levi

    Levi Zombie Pigman

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

    Levi Zombie Pigman

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

    Mr174 Spider Jockey

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

    Mr174 Spider Jockey

    Messages:
    34
    GitHub:
    Mr174
    Extract both vendor and src
     
  13. wolfdale

    wolfdale Zombie

    Messages:
    258
    I like how my post is invisible
     
    Aericio likes this.
  14. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,843
    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 Edwardthedog2 like this.
  15. Nathaniel Fredericks

    Nathaniel Fredericks Slime

    Messages:
    75
    GitHub:
    nathfreder
    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 Zombie Pigman

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

    jasonwynn10 Wither Skeleton Poggit Reviewer Verified

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

    Levi Zombie Pigman

    Messages:
    763
    GitHub:
    captainleviftw
    Could extend what class
     
  19. Edwardthedog2

    Edwardthedog2 Skeleton Verified

    Messages:
    870
    GitHub:
    edwardthedog2
    The CommandSender class.
     
  20. Levi

    Levi Zombie Pigman

    Messages:
    763
    GitHub:
    captainleviftw
    i ran compsoer.bat and it ran but closed immediately
     

Share This Page

  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.