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

Configs

Discussion in 'Development' started by MioTaku, Jan 20, 2017.

  1. MioTaku

    MioTaku Witch

    Messages:
    69
    GitHub:
    uselesswaifu
    How to get Sub Info Within a Config
    Code:
    Bronze1:
      Title: §l§7§kTRY§r §9§lBronze Crate §7§kTRY
      X: 809.000000
      "Y": 13.000000
      Z: 1040.500000
    How do i get the Title In this Config? and X Y Z Etc
     
  2. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    I think its
    PHP:
    $this->getConfig()->get("Bronzel.Title");
    Give it a try :)
     
  3. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    There are 3 ways, pick whichever is easiest for you.

    PHP:
    //method 1
    $config->getNested("Bronze1.Title");

    //Method 2
    $config->get("Bronze1")["Title"];

    //Method 3
    $config->getAll()["Bronze1"]["Title"];
     
  4. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Note that getNested is the slowest
     
    MioTaku likes this.
  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.