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

Entry in the configuration and delete recorded

Discussion in 'Development' started by Алексей, Nov 25, 2016.

  1. Алексей

    Алексей Silverfish

    Messages:
    22
    GitHub:
    opkiler22789
    How to make an entry in the config and delete the recorded example I need to write:
    Code:
    1:
            text: [text]
    how do I get it and remove it?
     
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    Vso prosta. izi
    PHP:
    Config::remove($key)
    Config::get($key$default null)
    Check this out
     
    Алексей likes this.
  3. Алексей

    Алексей Silverfish

    Messages:
    22
    GitHub:
    opkiler22789
    Thanks to forget about this documentation
     
  4. Алексей

    Алексей Silverfish

    Messages:
    22
    GitHub:
    opkiler22789
    and how do I attach it to my file?
    Если ты русский тогда вопрос: а как мне привязать его к своему файлу?
     
  5. Primus

    Primus Zombie Pigman

    Messages:
    749
    You mean, how to integrate this into your code? I'm not russian, I just understand Russian language as it's a third language I know.

    PHP:
    // $this является инстанция PluginBase
    $config $this->getConfig();
    $config->remove('your-key');
    // To get the value. чтобы получить значение
    $config->get('your-key');

    // And you might want to save the file
    $config->save();
     
    Last edited: Nov 25, 2016
  6. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Please note that you have to do Config->save() if you want to get the remove saved...
     
    Sandertv likes this.
  7. Primus

    Primus Zombie Pigman

    Messages:
    749
    How come you received a like and I did not? This world is messed up.
     
  8. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Probably because you spoke russian :p (This is not serious)
    Is speaking in another language than english even allowed here?
     
    Primus likes this.
  9. Primus

    Primus Zombie Pigman

    Messages:
    749
    Makes sense, but that doesn't neutralize the fact I was helpful.
     
    Sandertv 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.