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

Solved Enter World Event it exists any function?

Discussion in 'Development' started by LewBr, Oct 23, 2017.

  1. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    It has any function to get when player join's any world? Can anyone tell me how to do that event?
    Example:
    PHP:
    public function(PlayerWorldJoin $event){
        
    $player $event->getPlayer();
        if(
    $player->getLevel()->getName() == "Level"){
            
    $player->sendMessage("Hi.");
        }
    }
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What about EntityLevelChangeEvent?
     
    jasonwynn10 and LewBr like this.
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Thanks, and how can i get the player if he left that world?
     
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    same event
     
    Last edited: Oct 23, 2017
  5. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    I know it.. :shoghi: That's why i have Solved tag fixed.
     
    Last edited: Oct 23, 2017
  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.