Solved How to make a configuration file?

Discussion in 'Spigot Plugin Development' started by MLGEditz, Jun 1, 2017.

  1. Hello there,

    i wanted to add a configuration file so my plugin users can edit some settings like this:

    Code (Text):
    Language: En-en

    Block Op Ban : true

    Block Op Warn: false
    But how can i add that in my code?
    and which code?

    At the moment i have a messages file but that is one language and i wanted to add more languages.
    And some people requested to Block Op Banning but i think it is really anoyying so people can enable or disable it by themself.

    I hope you can help me!

    Greetings. MLGEditz.
     
  2. I recomend searching on the youtubes for a tutorial, read the docs or search for some code online to use as an example (be sure to actually look in to what the code does and not just copy it since you learn nothing from that)
     
  3. You can use my API ChocolateApi with the Class (object) CFile in it and do like the default config.yml (create it in your plugin and write what you want in it ) and enjoy!

    Envoyé de mon SM-G530W en utilisant Tapatalk
     
  4. There are much "good" tutorials on youtube