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

How do i read a config?

Comments in 'Plugin Development' started by Renzo, Jun 8, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Depends on how you define your YAML file.
  2. Lambo
    Offline

    Lambo Notable Member Plugin Developer

    Joined:
    Sep 14, 2013
    Posts:
    431
    Plugins:
    4
    Minecraft User:
    Lambo
    Why always
    PHP:
    if(boolean === true)
    ?
    I always use
    PHP:
    if(boolean) return true;
    if(!
    boolean) return false;
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Because new developers are not always sure they passed booleans. In case
    PHP:
    $var getValue();
    // $var = @getValue();
    if($var === false){
        echo 
    "Good job";
    }
    if(!
    $var){
        echo 
    "Boom! You died. Sorry no respawn button for you. xD";
    }
    function 
    getValue(){
    trigger_error("something"E_USER_ERROR);
    return;
    }
  4. DA_Swagnemite
    Offline

    DA_Swagnemite Notable Member Plugin Developer

    Joined:
    Nov 17, 2013
    Posts:
    386
    Plugins:
    7
    Minecraft User:
    DA_SWAGNEMITE
    It's easier for me to do it that way (personally) :p

Share This Page

Advertisement