mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Fixed missing chunks file
This commit is contained in:
parent
abc808b95b
commit
3ca993175e
@ -495,18 +495,20 @@ public class SlimefunStartup extends JavaPlugin {
|
|||||||
output.closeEntry();
|
output.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
ZipEntry entry = new ZipEntry("stored-chunks/chunks.sfc");
|
if (new File("data-storage/Slimefun/stored-chunks/chunks.sfc").exists()) {
|
||||||
output.putNextEntry(entry);
|
ZipEntry entry = new ZipEntry("stored-chunks/chunks.sfc");
|
||||||
FileInputStream input = new FileInputStream(new File("data-storage/Slimefun/stored-chunks/chunks.sfc"));
|
output.putNextEntry(entry);
|
||||||
|
FileInputStream input = new FileInputStream(new File("data-storage/Slimefun/stored-chunks/chunks.sfc"));
|
||||||
|
|
||||||
int length;
|
int length;
|
||||||
while ((length = input.read(buffer)) > 0) {
|
while ((length = input.read(buffer)) > 0) {
|
||||||
output.write(buffer, 0, length);
|
output.write(buffer, 0, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.close();
|
||||||
|
output.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
input.close();
|
|
||||||
output.closeEntry();
|
|
||||||
|
|
||||||
output.close();
|
output.close();
|
||||||
System.out.println("[Slimfun] Backed up Blocks to " + file.getName());
|
System.out.println("[Slimfun] Backed up Blocks to " + file.getName());
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user