Add Config

Discussion in 'Spigot Plugin Development' started by EnzoCARP, Jun 6, 2016.

  1. Code (Text):
    i
        public static Main instance;
        public static Inventory Kitmap = Bukkit.createInventory(null, 54, ChatColor.BLUE+""+ChatColor.BOLD+"Kitmap");

        public void onEnable(){
            instance = this;
       
            File config = new File(getDataFolder()+File.separator+"config.yml");
            if (!config.exists()) {
                getConfig().options().copyDefaults(true);
                saveConfig();
            }
        static{
            ItemStack dhelmet = new ItemStack(Material.DIAMOND_HELMET);
            dhelmet.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, prot);
            dhelmet.addEnchantment(Enchantment.DURABILITY, 3);
       
            Kitmap.setItem(13, dhelmet);
        }

     
    How to make a config to change the level of Enchantment?
     
    #1 EnzoCARP, Jun 6, 2016
    Last edited: Jun 6, 2016
  2. 1. Use [CODE ] tags
    2. Google
     
    • Agree Agree x 1
  3. Please use code tags or pastebin for code snippets, this hurts our eyes. All the answers are very easy to find on google, please do some research
     
  4. Don't come here and ask, try it. Learning is all about trial and error.