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

[New API] config.yml

Comments in 'Plugin Development' started by swagboy47, Jul 2, 2014.

  1. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    i need the following . how do you read a config? . how do you edit the config.yml? . how do you look up if something exist in a config? . and how do add to the config ? . and how do you remove stuff from the config? . and how do you make a config?
    thank you
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    64FF00 likes this.
  3. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
  4. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at the function names and guess what they are and how to use them. (Creating these objects is at the Advanced level in Learning-PocketMine-Development)

    Learn PHP about objects.
  6. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    i really don't have time to guess . just give me the answer ( i know . sham at me . i am teacher and i don't know the basics of configs :( )
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you know objects, you should know where to find the code of (new Config("blah"))->get($key).
  8. iFootball
    Offline

    iFootball Active Member

    Joined:
    Jun 9, 2014
    Posts:
    84
    Minecraft User:
    iFootball
    This would be educational for all of us.
  9. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
    Once again, my plugins use most of these functions. Look through the code, that's how I learned best.
    PEMapModder likes this.
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Of course. There are only two ways to learn plugin development I can think of: looking at the source code and looking at the source code of others' plugins.
    Dutok likes this.
  11. xpyctum
    Offline

    xpyctum Active Member Plugin Developer

    Joined:
    Jan 13, 2014
    Posts:
    292
    Plugins:
    4
    Minecraft User:
    tylerdisney
    Use two ways together ! :D
    PEMapModder and Dutok like this.
  12. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
    I'll give you a break though, configuration is kinda tough and the documentation isn't very clear.
    iFootball likes this.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes but instantiate config objects is easiest. I learnt it by looking at the BanItem plugin.
    Dutok likes this.
  14. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
    The hardest, in my opinion, is SQL (SQLite or MySQL). Queries can be difficult to form. :p
  15. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Correct. That's why I still don't understand SQLite3 databases in PHP even till now.
    Dutok likes this.
  16. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    371
    Plugins:
    3
    Minecraft User:
    Dutok
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Teach me SQLite3! XD
    (I really want to learn it, but I don't have time or effort to, because it looks hardly debugable, programs using it)
    Dutok likes this.

Share This Page

Advertisement