title: Minecraft Server Resource Pack Manager Application
body: <p>fellow developers.</p>
  <p>Let's imagine the following scenario: A group of friends is playing Minecraft on a server. That server has a <em>resource pack</em> associated (file <strong>server.properties</strong>, field <strong>resource-pack</strong>). That resource pack is a <strong>ZIP</strong> file hosted by <strong>Dropbox</strong>, and the respective <strong>Dropbox</strong> share link is what goes on field <strong>resource-pack</strong>.</p>
  <p>All good, for now. <em>Resource pack</em> loads flawlessly.</p>
  <p>However, those friends need to update the <em>resource pack</em> with their custom textures every now and then. I'd like to automate that process in the best way possible. To provide a custom texture, one needs 2 files: a <strong>.png</strong> file and a <strong>.properties</strong> file. Those are fairly easy to make. Then, those files need to be put in the following directory (<strong>Dropbox</strong>):</p>
  <p><code>/ResourcePack.zip/assets/minecraft/optifine/cit/</code></p>
  <p>The problem here is that the <strong>Dropbox API</strong> can't upload to existing ZIP files, and the <em>resource pack</em> has to be a <strong>ZIP</strong> file, int order for Minecraft to recognize it. Also, I don't want to download the ZIP file, extract, put the files inside, compress and upload again, because it's quite a large file and that would take some time.</p>
  <p>My Java application looks like this:</p>
  <p><a href="https://i.stack.imgur.com/waQpg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/waQpg.png" alt="enter image description here" /></a></p>
  <p>What the application does now, is accept dragged files and send them to the Dropbox path:</p>
  <p><code>/ResourcePack/assets/minecraft/optifine/cit/</code></p>
  <p>But not:</p>
  <p><code>/ResourcePack.zip/assets/minecraft/optifine/cit/</code></p>
  <p>I was told the <strong>Dropbox API</strong> can't handle uploads to <strong>ZIP</strong> files, and I also can't find anything on the documentation <a href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v2.1.x/" rel="nofollow noreferrer">here</a>.</p>
  <p>Can anyone think of a solution, other than downloading the full <em>resource pack</em>, and uploading it back everytime someone wants to add custom textures?</p>
  <p>Thank you.</p>
  <p><strong>EDIT:</strong></p>
  <p>So, as Adriaan suggested, I can simply use a direct link to the unzipped directory structure of the <em>resource pack</em>.</p>
  <p>The problem is now another:</p>
  <p>When a player joins the server, and downloads the <em>resource pack</em> for the first time ever, everything is fine. However, it gets cached in his local machine, in the following path:</p>
  <p><code>/.minecraft/server-resource-packs/</code></p>
  <p>So, when the <em>resource pack</em> is updated with new custom textures, minecraft will just load the cached <em>resource pack</em> and ignore any updates present in <strong>Dropbox</strong>. This results in the player not seeing the new custom textures.</p>
  <p>I've learned about the <a href="https://www.reddit.com/r/Minecraft/comments/4k4639/how_can_i_use_resourcepacksha1/" rel="nofollow noreferrer">resource-pack-sha1</a> field in <strong>server.properties</strong>. It looks just like what I need, but I can't quite understand how to use it.</p>
  <p>Thanks in advance.</p>