From 0d3e56f6b60942ffe40d992bda36de2cfef1bae4 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 8 Oct 2019 13:44:28 -0400 Subject: [PATCH 1/3] Fixed file backup npe. --- .../utils/storage/types/StorageYaml.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/songoda/epicheads/utils/storage/types/StorageYaml.java b/src/main/java/com/songoda/epicheads/utils/storage/types/StorageYaml.java index d82dbe6..fb5cf7b 100644 --- a/src/main/java/com/songoda/epicheads/utils/storage/types/StorageYaml.java +++ b/src/main/java/com/songoda/epicheads/utils/storage/types/StorageYaml.java @@ -6,19 +6,9 @@ import com.songoda.epicheads.utils.storage.StorageItem; import com.songoda.epicheads.utils.storage.StorageRow; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.MemorySection; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Deque; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; + +import java.io.*; +import java.util.*; public class StorageYaml extends Storage { @@ -118,7 +108,8 @@ public class StorageYaml extends Storage { File data = new File(instance.getDataFolder(), "data.yml"); File dataClone = new File(instance.getDataFolder(), "data-backup-" + System.currentTimeMillis() + ".yml"); try { - copyFile(data, dataClone); + if (data.exists()) + copyFile(data, dataClone); } catch (IOException e) { e.printStackTrace(); } From 09f39364c4b89aa043e4cd09de514ae3a907584f Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 8 Oct 2019 16:38:04 -0400 Subject: [PATCH 2/3] core update --- src/main/java/com/songoda/epicheads/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epicheads/settings/Settings.java b/src/main/java/com/songoda/epicheads/settings/Settings.java index 3688385..49b9331 100644 --- a/src/main/java/com/songoda/epicheads/settings/Settings.java +++ b/src/main/java/com/songoda/epicheads/settings/Settings.java @@ -15,7 +15,7 @@ import java.util.stream.Collectors; */ public class Settings { - static final Config config = EpicHeads.getInstance().getConfig().getCoreConfig(); + static final Config config = EpicHeads.getInstance().getCoreConfig(); public static final ConfigSetting AUTOSAVE = new ConfigSetting(config, "Main.Auto Save Interval In Seconds", 15, "The amount of time in between saving to file.", From 06e75fb064883fe8d19874a597fe290e6788de08 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 8 Oct 2019 16:35:28 -0400 Subject: [PATCH 3/3] version 3.2.2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51e9908..0b16d53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicHeads" path: "/builds/$CI_PROJECT_PATH" - version: "3.2.1" + version: "3.2.2" build: stage: build