From ec6a356b4e85e038f35a24780d12e18b44e6fce6 Mon Sep 17 00:00:00 2001 From: Vesek <61123478+Vesek@users.noreply.github.com> Date: Tue, 5 May 2020 19:49:38 +0200 Subject: [PATCH] "packs" directory auto-create (#484) * "packs" directory auto-create * cleaned indentation in ResourcePack.java * Cleaned ResourcePack.java * Another cleanup I hate editor on github. * Yet another * Another indentation cleanup --- .../java/org/geysermc/connector/utils/ResourcePack.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/ResourcePack.java b/connector/src/main/java/org/geysermc/connector/utils/ResourcePack.java index fb94c0517..c7e6d9030 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/ResourcePack.java +++ b/connector/src/main/java/org/geysermc/connector/utils/ResourcePack.java @@ -32,7 +32,11 @@ public class ResourcePack { } File directory = new File("packs"); - + + if (!directory.exists()) { + directory.mkdir(); + } + for(File file : directory.listFiles()) { if(file.getName().endsWith(".zip") || file.getName().endsWith(".mcpack")) { ResourcePack pack = new ResourcePack();