From f20fda8f81f32df1f6266de47262c05f3ad1c89c Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Thu, 20 Jun 2019 13:52:56 +0200 Subject: [PATCH] bugfix Signed-off-by: yaruma3341 --- .../commands/SchematicCommand.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/de/warking/schematicsystem/commands/SchematicCommand.java b/src/de/warking/schematicsystem/commands/SchematicCommand.java index 452f48b..7bc9c5a 100644 --- a/src/de/warking/schematicsystem/commands/SchematicCommand.java +++ b/src/de/warking/schematicsystem/commands/SchematicCommand.java @@ -173,7 +173,7 @@ public class SchematicCommand implements CommandExecutor { List checkedSchematics = CheckedSchematic.getLastDeclined(player.getUniqueId()); for(CheckedSchematic checkedSchematic : checkedSchematics) { if(checkedSchematic.getSchemOwner() == schematic.getSchemOwner() && - checkedSchematic.getSchemName() == schematic.getSchemName()) + checkedSchematic.getSchemName().equals(schematic.getSchemName())) checkedSchematic.remove(); } @@ -332,17 +332,15 @@ public class SchematicCommand implements CommandExecutor { } else player.sendMessage("§6Typ: §7" + schematic.getSchemType().name()); - if(schematic.getSchemType() == SchematicType.normal) { - List checkedSchematics = CheckedSchematic.getLastDeclined(player.getUniqueId()); - for(int i = checkedSchematics.size() -1; i > 0; i--) { - if(checkedSchematics.get(i).getSchemName().equals(schematic.getSchemName()) && - checkedSchematics.get(i).getSchemOwner() == schematic.getSchemOwner()) { - player.sendMessage("§cStatus: §c" + checkedSchematics.get(i).getStartTime() + " : " + checkedSchematics.get(i).getDeclineReason()); - TextComponent mehr = new TextComponent("§9mehr..."); - mehr.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem getmoreinfo " + schematic.getSchemName())); - player.spigot().sendMessage(mehr); - break; - } + List checkedSchematics = CheckedSchematic.getLastDeclined(player.getUniqueId()); + for(int i = checkedSchematics.size() -1; i >= 0; i--) { + if(checkedSchematics.get(i).getSchemName().equals(schematic.getSchemName()) && + checkedSchematics.get(i).getSchemOwner() == schematic.getSchemOwner()) { + player.sendMessage("§cStatus: §c" + checkedSchematics.get(i).getStartTime() + " : " + checkedSchematics.get(i).getDeclineReason()); + TextComponent mehr = new TextComponent("§9mehr..."); + mehr.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem getmoreinfo " + schematic.getSchemName())); + player.spigot().sendMessage(mehr); + break; } }