From d9fb0adabbd3eba53684f8d3e82563cf742ebcdf Mon Sep 17 00:00:00 2001 From: Keir Date: Tue, 27 Oct 2015 22:14:33 +0000 Subject: [PATCH] Only notify staff if 3 or more players report a player. --- .../src/mineplex/core/report/ReportManager.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java index 22feed2e8..619a8505d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java @@ -140,11 +140,16 @@ public class ReportManager { reportRepository.addElement(report); } - // [Report 42] [MrTwiggy +7] [Cheater102 - 5 - Speed hacking] - String message = String.format("[Report %d] [%s %d] [%s - %d - %s]", report.getReportId(), - reporter.getName(), reportProfile.getReputation(), - reportedPlayer.getName(), report.getReporters().size(), reason); - sendReportNotification(message); + // only start notifying staff when + if (report.getReporters().size() >= 3) + { + // [Report 42] [MrTwiggy +7] [Cheater102 - 5 - Speed hacking] + String message = String.format("[Report %d] [%s %d] [%s - %d - %s]", report.getReportId(), + reporter.getName(), reportProfile.getReputation(), + reportedPlayer.getName(), report.getReporters().size(), reason); + sendReportNotification(message); + } + reportSqlRepository.logReportSending(report.getReportId(), reporterId, reason); } }