Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved RequestChunkTask error when unloadLevel() in my code

Comments in 'Plugin Development' started by Valeron, Nov 17, 2015.

  1. Valeron
    Offline

    Valeron New Member

    Joined:
    Aug 26, 2015
    Posts:
    111
    Minecraft User:
    DarkSpive
    Crash Dump Tue Nov 17 16:05:40 UTC 2015

    Error: Call to a member function requestChunkTask() on null
    File: /src/pocketmine/level/Level__32bit
    Line: 2385
    Type: E_ERROR

    Code:
    [2376] continue;
    [2377] }
    [2378] list( $x, $z) = \explode(":", $index); $x = (int) $x; $z = (int) $z;;
    [2379] $this->chunkSendTasks[$index] = \true;
    [2380] if(isset($this->chunkCache[$index])){
    [2381] $this->sendChunkFromCache($x, $z);
    [2382] continue;
    [2383] }
    [2384] $this->timings->syncChunkSendPrepareTimer->startTiming();
    [2385] $task = $this->provider->requestChunkTask($x, $z);
    [2386] if($task !== \null){
    [2387] $this->server->getScheduler()->scheduleAsyncTask($task);
    [2388] }
    [2389] $this->timings->syncChunkSendPrepareTimer->stopTiming();
    [2390] }
    [2391]
    [2392] $this->timings->syncChunkSendTimer->stopTiming();
    [2393] }
    [2394] }
    [2395]



    My code:
    [/PHP]
    $lvl = $this->getServer()->getLevelByName("worlder");
    $this->getServer()->unloadLevel($lvl);
    PHP:

    When it will be run
    server will be disable.
  2. Valeron
    Offline

    Valeron New Member

    Joined:
    Aug 26, 2015
    Posts:
    111
    Minecraft User:
    DarkSpive
    My code
    $lvl = $this->getServer()->getLevelByName("worlder");
    $this->getServer()->unloadLevel($lvl);
    When it will be run, server will be disable.:mad:

Share This Page

Advertisement