mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-29 14:06:29 +01:00
Merge branch 'development' of gitlab.com:Songoda/epicheads into development
This commit is contained in:
commit
5d088d7189
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicHeads"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "3.2.0"
|
||||
version: "3.2.3"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
4
pom.xml
4
pom.xml
@ -78,8 +78,8 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.14.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -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
|
||||
|
@ -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.",
|
||||
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user