Fix Value mess

This commit is contained in:
altrisi committed 2020-12-27 15:53:44 +01:00
1 parent aabff1623b
commit 929c17da36
5 files changed
+69 -63

No files matched your search

@@ -1,12 +1,12 @@
package carpet.script.bundled;
import carpet.CarpetServer;
import carpet.script.value.Value;
import net.minecraft.nbt.Tag;
import net.minecraft.util.WorldSavePath;
import org.apache.commons.io.FilenameUtils;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonElement;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -80,7 +80,7 @@ public abstract class Module
synchronized (writeIOSync) { return FileModule.listFileContent(dataFile); }
}
public static Value readJsonFile(Module module, String resourceName, String type, boolean isShared) {
public static JsonElement readJsonFile(Module module, String resourceName, String type, boolean isShared) {
Path dataFile = resolveResource(module, resourceName, supportedTypes.get(type), isShared);
if (dataFile == null) return null;
if (!dataFile.toFile().exists()) return null;