Add Schemtransfer #81
@ -47,8 +47,8 @@
|
|||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>9</source>
|
<source>8</source>
|
||||||
<target>9</target>
|
<target>8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -77,7 +77,8 @@ public class ExternalUpDownload {
|
|||||||
name.append(schemName[i].replace("/", "-"));
|
name.append(schemName[i].replace("/", "-"));
|
||||||
}
|
}
|
||||||
Schematic testSchem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId());
|
Schematic testSchem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId());
|
||||||
byte[] schemData = zipInputStream.readAllBytes();
|
byte[] schemData = new byte[zipInputStream.available()];
|
||||||
|
zipInputStream.read(schemData);
|
||||||
if(testSchem != null) {
|
if(testSchem != null) {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -92,7 +93,7 @@ public class ExternalUpDownload {
|
|||||||
Schematic schem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId());
|
Schematic schem = Schematic.getSchemFromDB(name.toString(), player.getUniqueId());
|
||||||
schem.saveFromBytes(schemData, schemName[schemName.length - 1].equals("schem"));
|
schem.saveFromBytes(schemData, schemName[schemName.length - 1].equals("schem"));
|
||||||
zipInputStream.closeEntry();
|
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!");
|
player.sendMessage(SchematicSystem.PREFIX + "§aAlle deine Schematics wurden von §6W§7ar§6G§7ear§6W§7orld.net §aauf §eSteam§8War §aHochgeladen!");
|
||||||
zipInputStream.close();
|
zipInputStream.close();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren