"How to Load and Use Custom YAML Files in a Bukkit Plugin?"

Discussion in 'Plugin Development' started by zozo1404, Aug 25, 2024.

  1. Offline

    zozo1404

    Hello everyone,

    I'm working on a Bukkit plugin and need help with loading and using a custom YAML file in my plugin. I have a YAML file named `ItemStacks.yml` with the following content: ItemStacks.yml:
    Képernyőkép 2024-08-25 152722.png
     
    Last edited: Aug 25, 2024
  2. Offline

    DopeBrot

    Code:
    File file = new File("filename.yml");
    YamlConfiguration yml = YamlConfiguration.loadConfiguration(file);
    idk if thats what youre looking for, but this code is just loading the file into a YamlConfiguration.
     
  3. Offline

    zozo1404

    hello, thanks for the code! I just need to know how to use it. Also, how can I load the itemstack. Although the code slipped, but I'm editing it now, check it again. And can you help me how to load it into the plugin and use it?
     
  4. Offline

    timtower Administrator Administrator Moderator

    config.getItemStack() ?
     

Share This Page