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

Solved This has no errors, but I'm trying to test for a world and it applies to all of them

Discussion in 'Development' started by artulloss, Mar 21, 2018.

  1. artulloss

    artulloss Witch

    Messages:
    63
    GitHub:
    artulloss
    public function onHit(EntityDamageEvent $event){
    if($event->getEntity() instanceof Player){
    $level = $event->getEntity()->getLevel()->getFolderName();
    if($level->getFolderName() = $this->settings->getNested("worlds.combo")){
    $event->setCancelled(false);
    }
    }
    }
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    because you used a single = use a double == for comparison (equal)
     
    artulloss likes this.
  3. artulloss

    artulloss Witch

    Messages:
    63
    GitHub:
    artulloss
    ok I'll try that thanks
     
  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.