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

getAll levels

Comments in 'Plugin Development' started by Guillaume351, Mar 21, 2014.

  1. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    PHP:
    $monde $this->api->level->getAll();
        foreach(
    $monde as $m){
            
    console($m);
        }
        

    It get me error "object of class Level could not be converted to string"

    Thank you for helping
  2. Topic
    Offline

    Topic New Member Plugin Developer

    Joined:
    Aug 29, 2013
    Posts:
    47
    Plugins:
    3
    Minecraft User:
    topic
    Maybe you need to get name of worlds, try this:
    PHP:
    $monde $this->api->level->getAll()->getName();
  3. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Or maybe:
    PHP:
        $monde $this->api->level->getAll();
        foreach(
    $monde as $m){
            
    console($m->getName());
        }
        
  4. Guillaume351
    Offline

    Guillaume351 Active Member Plugin Developer

    Joined:
    Oct 11, 2013
    Posts:
    150
    Plugins:
    1
    Minecraft User:
    Guillaume351
    I will try, thank you !

Share This Page

Advertisement