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

send loading screen

Discussion in 'Development' started by padrone, May 28, 2018.

  1. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    how to send loading screen to player with command?
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
  3. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Do you want to send it when player teleports from one level to another?
     
  5. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    not teleport, but only building terrain. like this
     

    Attached Files:

  6. Marabou

    Marabou Baby Zombie

    Messages:
    137
    GitHub:
    wiligangster
    Try this:
    PHP:
        /**
         * @param Player $player
         */
        
    public function changeDimension(Player $player){
            
    $pk = new ChangeDimensionPacket();
            
    $pk->position $player->asVector3();
            
    $pk->dimension DimensionIds::OVERWORLD;
            
    $pk->respawn true;
            
    $player->dataPacket($pk);
        }

        
    //Exemple on the event.
        
    public function Interact(PlayerInteractEvent $ev){
           
    $this->changeDimension($ev->getPlayer());
       }
    Do not forget to register class.
    PS: You have many dimension like End, Nether.
     
    Last edited: May 29, 2018
  7. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    this work but, stuck in building terrain. how to close it?
     

    Attached Files:

  8. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    OnTheVerge 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.