mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-16 23:55:23 +01:00
Merge branch 'master' into spigot
This commit is contained in:
commit
84421bedbe
@ -1,6 +1,7 @@
|
||||
package com.sekwah.advancedportals.core.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.sekwah.advancedportals.core.AdvancedPortalsCore;
|
||||
|
||||
import java.io.*;
|
||||
@ -13,7 +14,7 @@ public class DataStorage {
|
||||
|
||||
public DataStorage(File dataFolder) {
|
||||
this.dataFolder = dataFolder;
|
||||
gson = new Gson();
|
||||
gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -75,6 +76,10 @@ public class DataStorage {
|
||||
if (!outFile.exists() || overwrite) {
|
||||
try {
|
||||
InputStream inputStream = DataStorage.class.getClassLoader().getResourceAsStream(fileLoc);
|
||||
if(inputStream == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FileOutputStream outStream = new FileOutputStream(outFile);
|
||||
|
||||
byte[] buf = new byte[1024];
|
||||
|
Loading…
Reference in New Issue
Block a user