From 07e10c86d9140ae8f4b7df481893e2793af0aa81 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 2 Dec 2021 14:48:37 +0100 Subject: [PATCH] Fix bugs Signed-off-by: Lixfel --- .../src/de/steamwar/schematicsystem/CheckSchemType15.java | 2 -- .../src/de/steamwar/schematicsystem/CheckSchemType8.java | 2 -- .../src/de/steamwar/schematicsystem/CheckSchemType.java | 4 +--- .../src/de/steamwar/schematicsystem/commands/GUI.java | 6 ------ 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/SchematicSystem_15/src/de/steamwar/schematicsystem/CheckSchemType15.java b/SchematicSystem_15/src/de/steamwar/schematicsystem/CheckSchemType15.java index 0d4c79c..e0640c9 100644 --- a/SchematicSystem_15/src/de/steamwar/schematicsystem/CheckSchemType15.java +++ b/SchematicSystem_15/src/de/steamwar/schematicsystem/CheckSchemType15.java @@ -84,8 +84,6 @@ public class CheckSchemType15 implements CheckSchemType.ICheckSchemType { Material.GOLDEN_HORSE_ARMOR, Material.HONEY_BOTTLE); - private CheckSchemType15(){} - @Override public void autoCheck(AutoCheckResult result, Clipboard clipboard) { BlockVector3 dimensions = clipboard.getDimensions(); diff --git a/SchematicSystem_8/src/de/steamwar/schematicsystem/CheckSchemType8.java b/SchematicSystem_8/src/de/steamwar/schematicsystem/CheckSchemType8.java index 6335f23..c5fa415 100644 --- a/SchematicSystem_8/src/de/steamwar/schematicsystem/CheckSchemType8.java +++ b/SchematicSystem_8/src/de/steamwar/schematicsystem/CheckSchemType8.java @@ -68,8 +68,6 @@ public class CheckSchemType8 implements CheckSchemType.ICheckSchemType { FLOWERS = flowers; } - private CheckSchemType8(){} - @Override public void autoCheck(AutoCheckResult result, Clipboard clipboard) { Vector dimensions = clipboard.getDimensions(); diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java index 2991f08..f3c3a01 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/CheckSchemType.java @@ -55,8 +55,6 @@ public class CheckSchemType { maxDispenserItems = section.getInt("Schematic.MaxDispenserItems", 128); maxBlocks = section.getInt("Schematic.MaxBlocks", 0); - //TODO: Materials in Config required in style of 1.8-1.12 and 1.13-1.15 - limits = new HashMap<>(); for(Map entry : section.getMapList("Schematic.Limited")) { int amount = (Integer) entry.get("Amount"); @@ -78,7 +76,7 @@ public class CheckSchemType { if(folder.exists()) { for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) { YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile); - if (!config.isConfigurationSection("CheckQuestions")) + if (!config.isList("CheckQuestions")) continue; new CheckSchemType(config); diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java index 15d1a4a..c9bf36e 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java @@ -60,12 +60,6 @@ class GUI { inv.setItem(0, SWItem.getDye(1), (byte) 1, "§eLöschen", click -> { schem.remove(); - List checkedSchematics = CheckedSchematic.getLastDeclined(p.getUniqueId()); - for(CheckedSchematic checkedSchematic : checkedSchematics) { - if(checkedSchematic.getSchemOwner() == schem.getSchemOwner() && - checkedSchematic.getSchemName().equals(schem.getSchemName())) - checkedSchematic.remove(); - } p.sendMessage(SchematicSystem.PREFIX + "Schematic §e" + schem.getSchemName() + " §7gelöscht"); p.closeInventory(); });