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

How to transfer a player to another server

Discussion in 'Development' started by Zuruki, May 21, 2017.

  1. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    How can I transfer a player to a server?
     
  2. moska

    moska Baby Zombie

    Messages:
    105
    GitHub:
    supermaxalex
    Player::transfert(ip, port)
     
    Zuruki likes this.
  3. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    thank mate
     
  4. falk

    falk Slime Poggit Reviewer

    Messages:
    75
    GitHub:
    falkirks
    PHP:
    $player->transfer($address$port$message);
    $player is an instance of \pocketmine\Player (the player to be transferred)
    $address is a string (the IP or domain of the server)
    optional $port is an int (the port of the server)
    optional $message is a string (kick message to use)
     
    Last edited: May 21, 2017
    Lowkey and jasonwynn10 like this.
  5. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    How can you set a message like a loading screen message?
     
  6. DogTheBlock

    DogTheBlock Spider Jockey

    Messages:
    29
  7. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    So the third parameter of transfer() is a string...?
     
  8. falk

    falk Slime Poggit Reviewer

    Messages:
    75
    GitHub:
    falkirks
    Updated my response to include this.
     
    jasonwynn10 likes this.
  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.