Solved Is "isLevelGenerated()" broken?

Discussion in 'Development' started by EndermannbugZJFC, May 21, 2020 at 9:50 AM.

  1. EndermannbugZJFC

    EndermannbugZJFC Silverfish

    Messages:
    18
    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 Silverfish

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

    dadodasyra Silverfish

    Messages:
    20
    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
     

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.