diff --git a/SchematicSystem_Main/pom.xml b/SchematicSystem_Main/pom.xml index 3986067..79f54a4 100644 --- a/SchematicSystem_Main/pom.xml +++ b/SchematicSystem_Main/pom.xml @@ -47,8 +47,8 @@ org.apache.maven.plugins maven-compiler-plugin - 9 - 9 + 8 + 8 diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java index 8042007..9cf1dbc 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java @@ -77,7 +77,8 @@ public class ExternalUpDownload { name.append(schemName[i].replace("/", "-")); } Schematic testSchem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId()); - byte[] schemData = zipInputStream.readAllBytes(); + byte[] schemData = new byte[zipInputStream.available()]; + zipInputStream.read(schemData); if(testSchem != null) { int i = 1; while (true) { @@ -92,7 +93,7 @@ public class ExternalUpDownload { Schematic schem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId()); schem.saveFromBytes(schemData, schemName[schemName.length - 1].equals("schem")); zipInputStream.closeEntry(); - player.sendMessage(SchematicSystem.PREFIX + "§6Die Schematic §e" + schematic.getName() + " §6wurde von WarGearWorld.net als §e" + name.toString() + " §6herruntergeladen!"); + player.sendMessage(SchematicSystem.PREFIX + "§6Die Schematic §e" + schematic.getName() + " §6wurde von WarGearWorld.net als §e" + name.toString() + " §6heruntergeladen!"); } player.sendMessage(SchematicSystem.PREFIX + "§aAlle deine Schematics wurden von §6W§7ar§6G§7ear§6W§7orld.net §aauf §eSteam§8War §aHochgeladen!"); zipInputStream.close();