diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java index 46cd3d748..0c97e3fa2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java @@ -118,6 +118,7 @@ public class ReportManager */ public CompletableFuture createReport(int reporterId, int suspectId, ReportCategory category, String message) { + // TODO only allow report if suspect actually did something return _reportRepository.getOngoingReport(suspectId, category) .thenCompose(reportIdOptional -> reportIdOptional.isPresent() ? _reportRepository diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/command/ReportCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/report/command/ReportCommand.java index 7aabf4300..c5446d651 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/command/ReportCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/command/ReportCommand.java @@ -47,6 +47,7 @@ public class ReportCommand extends CommandBase else { CoreClientManager clientManager = _commandCenter.GetClientManager(); + int reporterId = clientManager.getAccountId(reporter); String playerName = args[0]; Player suspect = UtilPlayer.searchOnline(reporter, playerName, false); String reason = F.combine(args, 1, null, false); @@ -60,18 +61,17 @@ public class ReportCommand extends CommandBase } else { - int reporterId = clientManager.getAccountId(reporter); CoreClient suspectClient = clientManager.Get(suspect); new ReportCategoryPage(Plugin, reporter, reporterId, suspectClient, reason).openInventory(); } } else { - clientManager.loadClientByName(playerName, client -> + clientManager.loadClientByName(playerName, suspectClient -> { - if (client != null) + if (suspectClient != null) { - // TODO report category page + new ReportCategoryPage(Plugin, reporter, reporterId, suspectClient, reason).openInventory(); } else {