diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/util/Functions.java | 37 |
1 files changed, 0 insertions, 37 deletions
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<String> 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); |