Player changeLevel

Discussion in 'Development' started by sdsd16, Jan 8, 2019.

  1. sdsd16

    sdsd16 Spider

    Messages:
    8
    GitHub:
    Danding1314
    How to use EntityLevelChangeEvent the event to write player changed message ~
     
  2. Emirhan Akpınar

    Emirhan Akpınar Silverfish

    Messages:
    18
    GitHub:
    EmirhanWSD
    PHP:
    public function onEntityLevelChange(EntityLevelChangeEvent $event) {
      
    $entity $entity->getEntity();
      if(
    $entity instanceof Player) {
        
    //message

      
    }

    }
     
  3. sdsd16

    sdsd16 Spider

    Messages:
    8
    GitHub:
    Danding1314
    I want to know the original world and the transformed world.
     
  4. corytortoise

    corytortoise Skeleton

    Messages:
    833
    GitHub:
    corytortoise
    Your answer was in the question. I just looked at EntityLevelChangeEvent.php, and found these functions.
     

Share This Page

  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.