From d307f890e2a93bc209cf84060d3dbd688a5bc737 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Wed, 26 Aug 2026 22:35:39 +0200 Subject: [PATCH] Remove debug output --- .../src/de/steamwar/sql/GameModeConfig.java | 33 ++++++++----------- .../steamwar/fightsystem/listener/Check.java | 2 -- .../schematiccommand/SchematicCommand.java | 4 +-- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java index 50fba0cc..51fbda83 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java +++ b/CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java @@ -733,7 +733,7 @@ public final class GameModeConfig { Set blocks = new HashSet<>(); for (YMLWrapper limitedLoader : loader.withAsList("Limited")) { BlockRule blockRule = new BlockRule<>(limitedLoader); - blocks.addAll(blockRule.Blocks); + blocks.addAll(blockRule.Materials); limited.add(blockRule); } for (M material : (List) SQLWrapper.impl.getMaterialWithGreaterBlastResistance(MaxBlastResistance)) { @@ -752,21 +752,21 @@ public final class GameModeConfig { public int getMaxCount(M material) { return Limited.stream() - .filter(rule -> rule.Blocks.contains(material)) - .mapToInt(rule -> rule.MaxCount) + .filter(rule -> rule.Materials.contains(material)) + .mapToInt(rule -> rule.Amount) .max() .orElse(Integer.MAX_VALUE); } public boolean isInventory(M material) { return Limited.stream() - .filter(rule -> rule.Blocks.contains(material)) + .filter(rule -> rule.Materials.contains(material)) .anyMatch(rule -> rule.Content.loaded); } public Integer getItemAmount(M material, M item) { return Limited.stream() - .filter(rule -> rule.Blocks.contains(material)) + .filter(rule -> rule.Materials.contains(material)) .filter(rule -> rule.Content.Items.contains(item)) .mapToInt(rule -> rule.Content.Amount) .max() @@ -779,14 +779,14 @@ public final class GameModeConfig { /** * The block materials this rule applies to */ - public final Set Blocks; + public final Set Materials; /** * Maximal amount of Blocks allowed in the schematic * * @implSpec {@code 0} by default */ - public final int MaxCount; + public final int Amount; /** * The item content filter for Blocks @@ -813,23 +813,18 @@ public final class GameModeConfig { } private BlockRule(YMLWrapper loader) { - List blocks = loader.getStringList("Blocks") + Set blocks = loader.getStringList("Materials") .stream() .flatMap(value -> expandInventoryGroup(loader, value).stream()) - .collect(Collectors.toList()); - if (blocks.isEmpty()) { // Legacy support - blocks = loader.getMaterialList("Materials"); - } - Blocks = Collections.unmodifiableSet(new HashSet<>(blocks)); - MaxCount = loader.getInt("MaxCount", // Legacy support - loader.getInt("Amount", 0) - ); + .collect(Collectors.toSet()); + Materials = Collections.unmodifiableSet(blocks); + Amount = loader.getInt("Amount", 0); Content = new Content<>(loader.with("Content")); } - private BlockRule(M block, int maxCount) { - Blocks = Collections.singleton(block); - MaxCount = maxCount; + private BlockRule(M block, int amount) { + Materials = Collections.singleton(block); + Amount = amount; Content = new Content<>(); } diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java index 987fda6e..fc724087 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/listener/Check.java @@ -51,7 +51,6 @@ public class Check implements Listener { .findFirst() .orElse(null); if (gameModeConfig == null) gameModeConfig = GameModeConfig.getDefaults(); - System.out.println(gameModeConfig.GameName + " " + gameModeConfig.Checkers); if (user.hasPerm(UserPerm.ADMINISTRATION)) return true; if (gameModeConfig.Checkers.isEmpty() && user.hasPerm(UserPerm.CHECK)) return true; return gameModeConfig.Checkers.contains(user.getId()); @@ -63,7 +62,6 @@ public class Check implements Listener { SteamwarUser user = SteamwarUser.get(player.getUniqueId()); SchematicNode schem = SchematicNode.getSchematicNode(Config.CheckSchemID); - System.out.println(player + " " + schem.getNodeOwner() + " " + " " + schem.getSchemtype() + " " + schem.getName()); if (checkPermission(user, schem)) return; if (user.getId() == schem.getOwner()) return; diff --git a/SchematicSystem/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java b/SchematicSystem/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java index 198a3689..e0b0b2ce 100644 --- a/SchematicSystem/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java +++ b/SchematicSystem/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommand.java @@ -243,8 +243,8 @@ public class SchematicCommand extends SWCommand { if (!result.isLimitedBlocksOK()) { Set toReplace = type.Schematic.Limited.stream() - .filter(rule -> rule.MaxCount == 0) - .flatMap(rule -> rule.Blocks.stream()) + .filter(rule -> rule.Amount == 0) + .flatMap(rule -> rule.Materials.stream()) .collect(Collectors.toSet()); BlockState replaceType = Objects.requireNonNull(toReplace.contains(Material.END_STONE) ? BlockTypes.IRON_BLOCK : BlockTypes.END_STONE).getDefaultState(); BlockVector3 min = clipboard.getMinimumPoint();