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

Solved Is "isLevelGenerated()" broken?

Discussion in 'Development' started by EndermannbugZJFC, May 21, 2020.

  1. EndermannbugZJFC

    EndermannbugZJFC Slime

    Messages:
    84
    GitHub:
    endermanbugzjfc
    I believe yes and this code is malfunctioning:
    PHP:
    foreach ($this->config->get("worldMask") as $w) {
                    if (
    $this->getServer()->isLevelGenerated(strval($w))) {
                        
    $this->wl array_merge($this->wl, [$w]);
                    }
                }
    any alternative code I can use instead?
     
  2. dadodasyra

    dadodasyra Witch

    Messages:
    68
    GitHub:
    dadodasyra
    Get the level and check if the value is null or empty
     
  3. dadodasyra

    dadodasyra Witch

    Messages:
    68
    GitHub:
    dadodasyra
    The thing is that this is exactly what isLevelGenerated does, it retrieves the server instance and checks if it is an instance of Level
     
  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.