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

Solved $player->transfer don't work

Discussion in 'Development' started by Kyd, Oct 28, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    When I transfer player with $player->transfer it all times say 'Unable to connect the world'
    How to fix?
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    well, your target server seems to be offline :/
     
    jasonwynn10 likes this.
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    No, my target server is online, I tried joining it without transfering and it worked and also tried transfering to other servers like lbsg, but still unable to connect the world
     
  4. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    PHP:
    $ip "IP-SERVER"
    $port "PORT"
    $player->transfer($ip$port);
    that work fine for me
     
    OnTheVerge and jasonwynn10 like this.
  5. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    Use the TransferPacket, the Player-> transfer () method closes the player immediately after the packet is executed, and the player will not be able to transfer to the second server.

    PHP:
    $pk = new TransferPacket();
    $pk->address "0.0.0.0"// adress
    $pk->port 19132// port
    $player->dataPacket($pk);
     
    OnTheVerge, jasonwynn10 and kazuya like this.
  6. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
  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.