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

Checking if users is in config.yml

Comments in 'Plugin Development' started by SpiderPig, May 18, 2014.

  1. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    Hi can anybody tell me what the problem is with this piece of code
    PHP:
    public function eventHandler($data$event){
            switch(
    $event){
                case 
    "player.block.break":

             
    $list $this->config->get('block-list');
             
    $listss $this->owner->get('owner');
            
            if (
    $this->api->ban->isOP($data['player']->username) or in_array($data['player']->username$listss))
                    return 
    true;
    The op bit works perfect but the in_array bit doesn't can anybody help me fix?
  2. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    Anyone able to help?
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What is $this->owner?
  4. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    The config to check in
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Reminder: $config->getAll(), or just use yaml_parse

Share This Page

Advertisement