From d04d86f60fe68cb92e2b1f267c522fc6b0af6bc1 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 27 Aug 2021 20:32:50 -0400 Subject: 1.3.0 beta 4 --- .../tylermurphy/hideAndSeek/util/Functions.java | 37 ---------------------- 1 file changed, 37 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/util') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java b/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java index c064839..57ae441 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java @@ -2,14 +2,7 @@ package net.tylermurphy.hideAndSeek.util; import static net.tylermurphy.hideAndSeek.Store.*; -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.ArrayList; -import java.util.Arrays; import java.util.List; import org.bukkit.Bukkit; @@ -109,36 +102,6 @@ public class Functions { } } - public static void copyFileStructure(File source, File target){ - try { - ArrayList ignore = new ArrayList<>(Arrays.asList("uid.dat", "session.lock")); - if(!ignore.contains(source.getName())) { - if(source.isDirectory()) { - if(!target.exists()) - if (!target.mkdirs()) - throw new IOException("Couldn't create world directory!"); - String files[] = source.list(); - for (String file : files) { - File srcFile = new File(source, file); - File destFile = new File(target, file); - copyFileStructure(srcFile, destFile); - } - } else { - InputStream in = new FileInputStream(source); - OutputStream out = new FileOutputStream(target); - byte[] buffer = new byte[1024]; - int length; - while ((length = in.read(buffer)) > 0) - out.write(buffer, 0, length); - in.close(); - out.close(); - } - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - public static void unloadMap(String mapname){ if(Bukkit.getServer().unloadWorld(Bukkit.getServer().getWorld(mapname), false)){ Main.plugin.getLogger().info("Successfully unloaded " + mapname); -- cgit v1.2.3-freya