Illuminatiiiiii
12/28/2018 - 6:03 AM

Configuration

package me.illuminatiproductions.spigotsandboxproject;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

public final class SpigotSandboxProject extends JavaPlugin{

    @Override
    public void onEnable() {
        // Plugin startup logic
        System.out.println("The plugin has started UP.");

        //Setup Config
        getConfig().options().copyDefaults();
        saveDefaultConfig();
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        //Accessing things from the config
        String thing1 = getConfig().getString("thing1");
        
        String thirditem = getConfig().getStringList("list").get(2);

        return true;
    }
}
thing1: 'I like booty'
list:
  - 'Pizza'
  - 'Grape'
  - 'Orange'