title: Why am I receiving an error, saying that the Plugins.yml file doesn't exist when it does?
body: <p><strong>Main.java</strong></p>
  <pre><code>package me.FactoryMC.FactoryBlocks;
  
  import java.util.Random;
  
  import org.bukkit.ChatColor;
  import org.bukkit.Material;
  import org.bukkit.World;
  import org.bukkit.command.Command;
  import org.bukkit.command.CommandSender;
  import org.bukkit.event.EventHandler;
  import org.bukkit.event.Listener;
  import org.bukkit.event.block.BlockBreakEvent;
  import org.bukkit.inventory.ItemStack;
  import org.bukkit.plugin.java.JavaPlugin;
  
  public class Main extends JavaPlugin implements Listener {
  
      @Override
      public void onEnable() {
          this.saveDefaultConfig();
          this.getServer().getPluginManager().registerEvents(this, this);
      }
  
      @Override
      public void onDisable() {
  
      }
  
      public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
          if (label.equalsIgnoreCase(&quot;fblock&quot;)) {
              if (!sender.hasPermission(&quot;factoryblocks.reload&quot;)) {
                  sender.sendMessage(ChatColor.translateAlternateColorCodes('&amp;',
                          &quot;&amp;cYou require &amp;6Dev &amp;cor higher to use this command.&quot;));
                  return true;
              }
              if (args.length == 0) {
                  // - /fblock
                  sender.sendMessage(ChatColor.RED + &quot;Use the correct format: /fblock reload&quot;);
                  return true;
              }
              if (args.length &gt; 0) {
                  // - /fblock reload
                  if (args[0].equalsIgnoreCase(&quot;reload&quot;)) {
                      for (String msg : this.getConfig().getStringList(&quot;language.reload&quot;)) {
                          sender.sendMessage(ChatColor.translateAlternateColorCodes('&amp;', msg));
                      }
                      this.reloadConfig();
                  }
              }
          }
          return false;
      }
  
      @EventHandler
      public void onBlockBreak(BlockBreakEvent event) {
          this.getConfig().getConfigurationSection(&quot;blocks&quot;).getKeys(false).forEach(key -&gt; {
              if (key.equalsIgnoreCase(event.getBlock().getType().toString())) {
                  ItemStack[] items = new ItemStack[this.getConfig().getStringList(&quot;blocks.&quot; + key).size()];
                  ItemStack item = null;
                  int position = 0;
                  Random r = new Random();
                  for (String i : this.getConfig().getStringList(&quot;blocks.&quot; + key)) {
                      try {
                          item = new ItemStack(Material.matchMaterial(i), r.nextInt(16));
                      } catch (Exception e) {
                          item = new ItemStack(Material.matchMaterial(key));
                      }
                      items[position] = item;
                      position++;
                  }
                  int num = r.nextInt(items.length);
                  event.setDropItems(false);
                  World world = event.getPlayer().getWorld();
                  world.dropItemNaturally(event.getBlock().getLocation(), items[num]);
              }
          });
      }
  
  }
  </code></pre>
  <p><strong>plugin.yml</strong></p>
  <pre><code>main: me.FactoryMC.FactoryBlocks.Main
  name: FactoryBlocks
  author: FactoryMC
  version: 1.0
  
  commands:
    FactoryBlocks:
  </code></pre>
  <p><strong>Error Message:</strong></p>
  <pre><code>Could not load 'plugins\FactoryBlocks.jar' in folder 'plugins'
  org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
          at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:383) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:185) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:808) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[server.jar:git-Spigot-37d799b-3eb7236]
          at java.lang.Thread.run(Unknown Source) [?:1.8.0_271]
  Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    
  </code></pre>
  <p><strong>Screenshot (File Formatting)</strong>
  <a href="https://gyazo.com/0167c82d654139c4df62d78f10829879" rel="nofollow noreferrer">https://gyazo.com/0167c82d654139c4df62d78f10829879</a></p>
  <p>If you haven't already noticed, I'm new to coding Minecraft Plugins - and I saw this as a good plugin to start off with. I've been trying to figure out how this is an error, but I couldn't figure it out.</p>
  <p>Undoubtedly someone will be able to pick it up just by first glance, thanks.</p>