From 5243efaf58a4b1653dc2424615f9579a3f14f465 Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 23 Sep 2019 12:47:17 -0400 Subject: [PATCH 1/7] Pom fix --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9e60ffd..7e72ec4 100644 --- a/pom.xml +++ b/pom.xml @@ -70,8 +70,8 @@ org.spigotmc - spigot-api - 1.14.4-R0.1-SNAPSHOT + spigot + 1.14.4 provided From 11fa9e5ee8b022a8b187f6f639993f9a36bd4129 Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 23 Sep 2019 12:47:39 -0400 Subject: [PATCH 2/7] version 3.2.1 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 296c22c..51e9908 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.0" + version: "3.2.1" build: stage: build From 0d3e56f6b60942ffe40d992bda36de2cfef1bae4 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 8 Oct 2019 13:44:28 -0400 Subject: [PATCH 3/7] 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 4/7] 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 5/7] 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 From e4ac71e8fffc141cb4a1c6fdca7f5604e9a30684 Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 11 Oct 2019 13:24:52 -0400 Subject: [PATCH 6/7] Fixed issue with tokens not working. --- src/main/java/com/songoda/epicheads/EpicHeads.java | 3 ++- src/main/java/com/songoda/epicheads/settings/Settings.java | 2 +- src/main/java/com/songoda/epicheads/utils/ItemEconomy.java | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/songoda/epicheads/EpicHeads.java b/src/main/java/com/songoda/epicheads/EpicHeads.java index eda9f0f..6c5daf2 100644 --- a/src/main/java/com/songoda/epicheads/EpicHeads.java +++ b/src/main/java/com/songoda/epicheads/EpicHeads.java @@ -44,7 +44,7 @@ public class EpicHeads extends SongodaPlugin { private HeadManager headManager; private PlayerManager playerManager; private CommandManager commandManager; - PluginHook itemEconomyHook = PluginHook.addHook(Economy.class, "EpicHeads", com.songoda.epicheads.economy.ItemEconomy.class); + private PluginHook itemEconomyHook; private Storage storage; @@ -55,6 +55,7 @@ public class EpicHeads extends SongodaPlugin { @Override public void onPluginLoad() { INSTANCE = this; + this.itemEconomyHook = PluginHook.addHook(Economy.class, "EpicHeads", com.songoda.epicheads.utils.ItemEconomy.class); } @Override diff --git a/src/main/java/com/songoda/epicheads/settings/Settings.java b/src/main/java/com/songoda/epicheads/settings/Settings.java index 49b9331..d7c3fc3 100644 --- a/src/main/java/com/songoda/epicheads/settings/Settings.java +++ b/src/main/java/com/songoda/epicheads/settings/Settings.java @@ -49,7 +49,7 @@ public class Settings { public static final ConfigSetting ECONOMY_PLUGIN = new ConfigSetting(config, "Economy.Economy", EconomyManager.getEconomy() == null ? "Vault" : EconomyManager.getEconomy().getName(), "Which economy plugin should be used?", - "Supported plugins you have installed: \"" + EconomyManager.getManager().getRegisteredPlugins().stream().collect(Collectors.joining("\", \"")) + "\"."); + "Supported plugins you have installed: \"" + EconomyManager.getManager().getRegisteredPlugins().stream().filter(p -> !p.equals("EpicHeads")).collect(Collectors.joining("\", \"")) + "\", \"Item\"."); public static final ConfigSetting HEAD_COST = new ConfigSetting(config, "Economy.Head Cost", 24.99, "The cost the of the head. If you wan't to use PlayerPoints", diff --git a/src/main/java/com/songoda/epicheads/utils/ItemEconomy.java b/src/main/java/com/songoda/epicheads/utils/ItemEconomy.java index ba06178..73d93d9 100644 --- a/src/main/java/com/songoda/epicheads/utils/ItemEconomy.java +++ b/src/main/java/com/songoda/epicheads/utils/ItemEconomy.java @@ -1,7 +1,6 @@ -package com.songoda.epicheads.economy; +package com.songoda.epicheads.utils; import com.songoda.core.hooks.economies.Economy; -import com.songoda.epicheads.utils.Methods; import org.bukkit.OfflinePlayer; import org.bukkit.inventory.ItemStack; @@ -68,6 +67,6 @@ public class ItemEconomy extends Economy { @Override public boolean isEnabled() { - return false; + return true; } } From b05b1fc2ce9ecd4da1916e02e7956fe5df196042 Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 11 Oct 2019 13:25:42 -0400 Subject: [PATCH 7/7] version 3.2.3 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b16d53..b9eeb94 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.2" + version: "3.2.3" build: stage: build