mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-12-04 08:23:23 +01:00
Merge branch 'development'
This commit is contained in:
commit
199834b4d5
@ -4,7 +4,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
name: "EpicHeads"
|
name: "EpicHeads"
|
||||||
path: "/builds/$CI_PROJECT_PATH"
|
path: "/builds/$CI_PROJECT_PATH"
|
||||||
version: "3.2.1"
|
version: "3.2.2"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -15,7 +15,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class Settings {
|
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,
|
public static final ConfigSetting AUTOSAVE = new ConfigSetting(config, "Main.Auto Save Interval In Seconds", 15,
|
||||||
"The amount of time in between saving to file.",
|
"The amount of time in between saving to file.",
|
||||||
|
@ -6,19 +6,9 @@ import com.songoda.epicheads.utils.storage.StorageItem;
|
|||||||
import com.songoda.epicheads.utils.storage.StorageRow;
|
import com.songoda.epicheads.utils.storage.StorageRow;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.MemorySection;
|
import org.bukkit.configuration.MemorySection;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
import java.io.*;
|
||||||
import java.io.FileOutputStream;
|
import java.util.*;
|
||||||
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;
|
|
||||||
|
|
||||||
public class StorageYaml extends Storage {
|
public class StorageYaml extends Storage {
|
||||||
|
|
||||||
@ -118,6 +108,7 @@ public class StorageYaml extends Storage {
|
|||||||
File data = new File(instance.getDataFolder(), "data.yml");
|
File data = new File(instance.getDataFolder(), "data.yml");
|
||||||
File dataClone = new File(instance.getDataFolder(), "data-backup-" + System.currentTimeMillis() + ".yml");
|
File dataClone = new File(instance.getDataFolder(), "data-backup-" + System.currentTimeMillis() + ".yml");
|
||||||
try {
|
try {
|
||||||
|
if (data.exists())
|
||||||
copyFile(data, dataClone);
|
copyFile(data, dataClone);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user