From bc4d354a80f1fe60e931447a4a70a0a995c99511 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 13 Dec 2019 07:06:18 +0100 Subject: [PATCH] Check schematic name length --- .../steamwar/schematicsystem/commands/SchematicCommand.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index be525db..af2ed7c 100644 --- a/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Main/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -164,6 +164,11 @@ public class SchematicCommand implements CommandExecutor { if(invalidSchemName(player, args[1])) return; + if(args[1].length() > 64){ + player.sendMessage(SchematicSystem.PREFIX + "§cDer Name der Schematic ist zu lang"); + return; + } + Schematic schematic = Schematic.getSchemFromDB(args[1], player.getUniqueId()); if(schematic != null && !schematic.getSchemType().writeable()) { player.sendMessage(SchematicSystem.PREFIX + "§cDu darfst diese Schematic nicht überschreiben");