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

Command for Transferring Player

Discussion in 'Facepalm' started by BlawoHD, Jun 8, 2017.

  1. BlawoHD

    BlawoHD Silverfish

    Messages:
    21
    I want to transfer a player with the command "hub" to another server.
     
  2. RoyalMCPE

    RoyalMCPE Slime

    Messages:
    87
    Just make a command and do

    PHP:
    $pk = new TransferPacket ();
    $pk->adress "The ip of the server";
    $pk->port =  "The port of the server";
    $sender->dataPacket $pk );
     
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    But then again, PocketMine handles it better. Try not reinventing bicycles.
    PHP:
    /** @var Player $player */
    $player->transfer(IPport);
     
    SOFe, Sandertv and EdwardHamHam like this.
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    See also Hormones, which also does this but selects the most free target server from a list of servers in a network to balance the load.
     
  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.