Best file type.

Discussion in 'Spigot Plugin Development' started by Mystic_Mark_, Oct 10, 2019.

  1. I want to create a plugin where i can read a file that is in this format:

    Time to execute in milliseconds and than a list of commands to execute. But what will be the best file type for this.

    Something like this:


    Or if you have another format for saving this let me know.
  2. drives_a_ford

    Junior Mod

    Why not simply use the Configuration API? The default implementation is YAML, but you're welcome to write your own if you dislike that for you.
  3. It's probably best to just use the proven YamlConfiguration from spigot, just create the config to resemble something like this:
    Code (YAML):
    Commands Times:
       - command1
        - command2
       - command3
       - command4
    #3 Tiny_Spider, Oct 10, 2019
    Last edited: Oct 10, 2019
  4. Just use YAML then?
  5. Yes. What’s wrong with YAML? It’s easily understood by most if not everyone that’ll probably be using your plugin and it does exactly what you need it to do.