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

Player changeLevel

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

  1. sdsd16

    sdsd16 Spider Jockey

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

    Emirhan Akpınar Slime

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

      
    }

    }
     
  3. sdsd16

    sdsd16 Spider Jockey

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

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    Your answer was in the question. I just looked at EntityLevelChangeEvent.php, and found these functions.
     
  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.