From befec0fc1b4279fc9bf0a54cb8db1684e2eb1644 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 9 Jan 2021 20:13:34 +0100 Subject: [PATCH] Fixing of SchemName --- .../src/de/steamwar/schematicsystem/ExternalUpDownload.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java index fe6a0b2..beea846 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/ExternalUpDownload.java @@ -97,7 +97,7 @@ public class ExternalUpDownload { name.append("."); name.append(replaceString(schemName[i])); } - String schematicName = name.substring(0, 60); + String schematicName = name.substring(0, Math.min(60, name.length())); Schematic testSchem = Schematic.getSchemFromDB(schematicName, player.getUniqueId()); List schemData = new ArrayList<>(); while (zipInputStream.available() == 1) {